[−][src]Module terminus_store::structure::bitarray
Code for reading, writing, and using bit arrays.
A bit array is a contiguous sequence of N bits contained in L words. By choosing L as the minimal number of words required for N bits, the sequence is compressed and yet aligned on a word boundary.
Notes
- All words are stored in a standard big-endian encoding.
- The maximum number of bits is 2^64-1.
Naming
Because of the ambiguity of the English language and the possibility to confuse the meanings of the words used to describe aspects of this code, we try to use the following definitions consistently throughout:
-
buffer: a contiguous sequence of bytes
-
size: the number of bytes in a buffer
-
word: a 64-bit contiguous sequence aligned on 8-byte boundaries starting at the beginning of the input buffer
-
index: the logical address of a bit in the data buffer.
-
length: the number of usable bits in the bit array
Structs
BitArray | A thread-safe, reference-counted, compressed bit sequence. |
BitArrayBlockDecoder | |
BitArrayFileBuilder |
Enums
BitArrayError | An error that occurred during a bit array operation. |
Functions
bitarray_stream_bits | |
bitarray_stream_blocks |