![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Dictionary decoder for Parquet PLAIN_DICTIONARY / RLE_DICTIONARY encoding. More...
#include <dictionary.hpp>
Public Member Functions | |
| DictionaryDecoder (const uint8_t *dict_data, size_t dict_size, size_t num_dict_entries, PhysicalType type) | |
| Construct a decoder by parsing the raw PLAIN-encoded dictionary page. | |
| expected< std::vector< T > > | decode (const uint8_t *indices_data, size_t indices_size, size_t num_values) const |
| Decode an RLE_DICTIONARY indices page into original typed values. | |
| size_t | dictionary_size () const |
| Number of entries in the dictionary. | |
Dictionary decoder for Parquet PLAIN_DICTIONARY / RLE_DICTIONARY encoding.
Reconstructs original typed values from a PLAIN-encoded dictionary page and an RLE_DICTIONARY-encoded indices page. The constructor parses the dictionary page; decode() then maps indices back to values.
| T | The value type (std::string, int32_t, int64_t, float, or double). |
Definition at line 413 of file dictionary.hpp.
|
inline |
Construct a decoder by parsing the raw PLAIN-encoded dictionary page.
Decodes num_dict_entries values from dict_data using the appropriate PLAIN format for type T. The decoded values are stored internally for index-based lookup during decode().
| dict_data | Pointer to PLAIN-encoded dictionary page bytes. |
| dict_size | Size of the dictionary page in bytes. |
| num_dict_entries | Number of entries in the dictionary. |
| type | The Parquet physical type (retained for metadata; actual decoding dispatches on template type T). |
Definition at line 426 of file dictionary.hpp.
|
inline |
Decode an RLE_DICTIONARY indices page into original typed values.
Reads the 1-byte bit_width prefix, decodes the RLE/Bit-Packing Hybrid index stream, and maps each index back to its dictionary value. Returns an empty vector if any index is out of bounds.
| indices_data | Pointer to the indices page (1-byte bit_width + RLE payload). |
| indices_size | Size of the indices page in bytes. |
| num_values | Number of values to decode. |
Definition at line 451 of file dictionary.hpp.
|
inline |
Number of entries in the dictionary.
Definition at line 482 of file dictionary.hpp.