Skip to content

An integer group stores a run of unsigned integers in frames. Revisions 3 and 4 use it for keys and for payload variables. Groups are not length-prefixed: the value count comes from the block head n.

A group of n values is cut into frames of at most 128 values. Each frame is:

Field Encoding Meaning
width u8, at most 64 bits per value in this frame; 0 means all values equal lo and no bit bytes follow
lo varint the smallest value of the frame
bits ceil(k * width / 8) bytes, LSB-first k values, each stored as v - lo in width bits, packed with no padding between values

k is the number of values in the frame, which is 128 except for the last frame. width is the bit length of max - lo, and lo is the frame minimum.

Integer keys are split into a high part (the key shifted right by the last bound) and up to three lower bit fields. The high part rises from top by the stored deltas; keys must strictly ascend in revision 3 (for the first field of revision 4, non-strictly).

Field Encoding Meaning
top u64 big-endian the first key shifted right by top_bit
nb u8, at most 3 number of lower fields
bounds nb bytes strictly ascending bit bounds; readers accept 1 to 63, writers use only the sets [], [22], [12,22], [17,22], [12,17,22], [12], [17], [12,17]
high deltas group(n-1) deltas of the high parts
lower fields nb times group(n) one group per lower bit field: field j holds bits from the previous bound (0 for the first) up to bound j

Decoders check widths, field ranges, strict ordering and exact length (SPEC V652, V731).