Expand description
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.
- BitArray
Block Decoder - BitArray
Block Iterator - BitArray
BufBuilder - BitArray
File Builder
Enums§
- BitArray
Error - An error that occurred during a bit array operation.
Functions§
- bitarray_
iter_ blocks - bitarray_
len_ from_ file - Read the length (number of bits) from a
FileLoad. - bitarray_
stream_ bits - bitarray_
stream_ blocks