pub enum Kind {
Constant = 0,
Packed = 1,
Delta = 2,
Rle = 3,
Dict = 4,
Sparse = 5,
}Expand description
What a chunk is encoded as. The discriminant is the tag byte in the serialized form and is part of the format, so the numbers are written down rather than left to the compiler.
Variants§
Constant = 0
One value repeated. The whole chunk is the tag, the count and the value.
Packed = 1
Frame of reference then bit packed, per 1024 values. Covers plain bit packing at base zero and a raw copy at width 64.
Delta = 2
Differences between neighbours, zigzagged so a decreasing column is as cheap as an increasing one, then encoded as a chunk in its own right.
Rle = 3
Run values and run lengths, each encoded as a chunk in its own right.
Dict = 4
A dictionary of the distinct values and an array of codes into it, both encoded as chunks in their own right.
Sparse = 5
One dominant value with an exception list of positions and values.