Commit graph

4 commits

Author SHA1 Message Date
Fletcher Haynes
eb06bb50ae Updated code to latest version for open-sourcing. 2022-09-02 13:23:39 -07:00
Seebs
827923e616 Handle file sizes over 4GB
We only have 4 bytes for offsets, but what if a file is
over 4GB? Someone came to us with a file with 265 *million* containers,
in a single fragment, which means that over 3GB of their 4.7GB file
is actually just the container headers alone. But we can't easily make
the offsets larger, or change the file format.

So we don't. We just track how many 4GB hunks of the file we've
been through and bump that every time the 32-bit offset wraps. And this
appears to... just work.

This is fixed for both the roaring iterator and the old unmarshalBinary
logic. The logic to handle this will work on 32-bit hosts in the sense
that it will correctly error out for excessively large file sizes or
container counts, but it doesn't actually handle the large files since
it can't.
2020-04-24 10:56:24 -05:00
Cody Soyland
8e208569e8 Remove build tag that break enterprise build 2019-09-17 13:34:28 -05:00
Matt Jaffee
b84eada521
rename file and add license header 2019-08-07 08:09:04 -05:00
Renamed from roaring/roaring_unmarshal_binary.go (Browse further)