Expand description
Bitvector<N> and Bitlist<N> — bit-packed homogeneous boolean storage.
Both use big-endian bit packing within each byte: bit i of the
logical bitstream is stored at bytes[i / 8] & (1 << (i % 8)).
Bitvector<N>has length exactlyN, takes(N + 7) / 8bytes; any bits beyondNin the final byte must be zero.Bitlist<N>has variable length up toN. The wire form appends a sentinel1bit immediately after the data bits; the decoder finds the highest set bit in the final byte to recover the length.