Skip to main content

Module delta_patch

Module delta_patch 

Source
Expand description

Delta plus patched bit packing (encoding id 12).

Same front end as encoding id 5: base: u64 LE, then zigzag deltas with the running previous seeded from the base. The difference is the container: deltas go through patch instead of for_bitpack, so a rare wide gap becomes an exception instead of setting the packed width for its whole 1024-value chunk. This is the encoding CSR adjacency wants: within a neighbor list the gaps are small, and the hub jumps and list restarts that used to price every chunk at 23 bits on LiveJournal move into the exception stream.

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.