Skip to main content

Module dictionary

Module dictionary 

Source
Expand description

Dictionary encoding for string columns (tags and low-cardinality strings).

Maps unique string values to integer indices and encodes the indices with minimal bit-packing. The dictionary is stored inline in the encoded block.

§Format

[value_count: u32]
[dict_size: u32]
[dict entry 0: len u16, bytes...]
[dict entry 1: len u16, bytes...]
...
[bit_width: u8]
[packed indices at bit_width bits each]

Structs§

DictionaryDecoder
Dictionary-based string decoder.
DictionaryEncoder
Dictionary-based string encoder.