Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dictionary Decoder

In the upcoming steps, we decode pages with Dictionary Encoding.

Dictionary Encoding

Dictionary encoding encodes data in 2 places:

  • A dictionary page: stores actual values encoded using Plain Encoding, which we have fully implemented
  • Multiple Data pages: store value’s indexes (in integers) encoded using RLE Bit-packing Hybrid Encoding. However, the RLE Bit-packing Hybrid decoder can only work with booleans at the moment

Dictionary page stores values, data page stores indexes

Implementation

The implementation flow is a bit unusual. We first teach the parser about dictionary page, then parse columns in dictionary encoding with at most two unique values, and finally make them work with arbitrary number of values.