Skip to main content

Module for_bitpack

Module for_bitpack 

Source
Expand description

Frame-of-reference plus bit packing (encoding id 4).

Layout: count: u32 LE, then per 1024-value chunk a header of min: u64 LE, width: u8 followed by the packed body, which is bitpack::packed_bytes(width, chunk_len) bytes. Full chunks are independently decodable at fixed offsets, which is what makes chunk-granular point reads cheap; only the final chunk can be short.

Functions§

decode
Decodes an encoded buffer, appending at most max_values values to out. A container claiming more than the caller’s ceiling is rejected before anything is allocated for it.
encode
Encodes values into out, returning the encoded byte length.