Skip to content

Bytes DICT stores each distinct byte string once and refers to it by index. It is codec id 1 in BytesCol. The integer version is Integer DICT.

Field Encoding Meaning
codec u8 1
dictionary Plain the distinct values, laid out as in Bytes PLAIN without its codec byte
indexes Flat one index into the dictionary per value

The count of values is the count of the indexes Flat. See Column container types.

  1. Read the codec byte (1), the dictionary Plain and the indexes Flat.
  2. Value i is dictionary entry indexes[i].

Derived by hand, not from a real file. The values x, y, x, x use the dictionary x, y and the indexes 0, 1, 0, 0.

01 codec DICT
02 00 02 dictionary lens: IntCol, count 2, CONST 1
01 00 00 offset samples: Flat, count 1, CONST 0
02 78 79 total 2, bytes "x" "y"
04 01 00 01 02 indexes: Flat FOR, min 0, width 1, bits 0 1 0 0

Decoded: x, y, x, x.

  • Every index is below the number of dictionary entries.
  • Everything that Bytes PLAIN checks for the dictionary.

See How writers choose a codec.