BitPacker
Bit-packing and unpacking for TurboQuant codes.
Packs signed N-bit integer codes into compact byte arrays for storage. Supports 2, 3, 4, and 8-bit packing. Codes are stored as unsigned offsets (biased by 2^(bits-1)) to simplify packing.
Packing is append-friendly: codes can be packed incrementally per token without re-packing the entire cache.