PackedInts
Simplistic compression for array of unsigned long values. Each value is >= 0 and <= a specified maximum value. The values are stored as packed ints, with each value consuming a fixed number of bits.
Types
A format to write packed ints.
Simple class that holds a format and a number of bits per value.
A packed integer array that can be modified.
A Reader which has all its values equal to 0 (bitsPerValue = 0).
A read-only random access array of positive integers.
Run-once iterator interface, to decode previously saved PackedInts.
Properties
Functions
Returns how many bits are required to hold values up to and including maxValue NOTE: This method returns at least 1.
Check that the block size is a power of 2, in the right bounds, and return its log in base 2.
Check the validity of a version number.
Copy src[srcPos:srcPos+len] into dest[destPos:destPos+len] using at most mem bytes.
Same as .copy but using a pre-allocated buffer.
Try to find the Format and number of bits per value that would restore from disk the fastest reader whose overhead is less than acceptableOverheadRatio.
Get a Decoder.
Get an Encoder.
Create a packed integer array with the given amount of values initialized to 0. the valueCount and the bitsPerValue cannot be changed after creation. All Mutables known by this factory are kept fully in RAM.
Same as .getMutable with a pre-computed number of bits per value and format.
Expert: Restore a ReaderIterator from a stream without reading metadata at the beginning of the stream. This method is useful to restore data from streams which have been created using PackedInts.getWriterNoHeader.
Expert: Create a packed integer array writer for the given output, format, value count, and number of bits per value.
Returns how many bits are required to store bits, interpreted as an unsigned value. NOTE: This method returns at least 1.