Overview
Bit-Packing writes fixed-width or variable-width fields into a compact binary stream instead of storing each value in a full machine word.
Stores small integer values using only the number of bits they need.
Compact metadata for implementation and discovery.
Bit-Packing writes fixed-width or variable-width fields into a compact binary stream instead of storing each value in a full machine word.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(ceil(n * bits / word_size))
bits = ceil(log2(max_value + 1))Chooses how many bits are needed for unsigned values up to the maximum.
Show several small integers occupying adjacent bit fields inside machine words.
Bit order and alignment must be documented for interoperable encoders.
What each reference supports for this entry.
Compression reference for Bit-Packing bit-level representation, packing fields, and entropy-coding support.
Good next jumps from the relationship graph, ranked for useful discovery.
Delta-encoded values are often bit-packed when their range is small.
Bit packing is often used alongside compact integer encodings.