Skip to main content

Module delta

Module delta 

Source
Expand description

Delta plus bit packing (encoding id 5).

Consecutive differences are zigzag mapped to u64 and fed through the frame-of-reference container. The layout is base: u64 LE holding the first value, then for_bitpack over zigzag deltas with the running previous seeded from base, so the first chunk’s width reflects the gaps and never the absolute magnitude of the start. Sorted inputs such as CSR neighbor lists produce small non-negative deltas, which is where the bits-per-edge budget comes from; unsorted input stays correct, just larger.

Functions§

decode
Decodes an encoded buffer, appending at most max_values values to out; a container claiming more is rejected before allocation.
encode
Encodes values into out, returning the encoded byte length.