Manages zstd dictionaries for improved compression of Gorilla-compressed segments.
On startup, loads any existing dictionary from data_dir/dict_v*.zstd.
Stores compiled cdict/ddict in persistent_term for zero-cost access
during compression and decompression.
Dictionaries are trained via mix tm.train_dict or train/2.
Summary
Functions
Returns a specification to start this module under a supervisor.
Get the compiled compression dictionary for a store, or nil if none.
Get the compiled decompression dictionary for a store, or nil if none.
Get the raw dictionary binary for a store, or nil if none.
Get the dictionary version for a store, or 0 if none.
Train a dictionary from existing segment data.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Get the compiled compression dictionary for a store, or nil if none.
Get the compiled decompression dictionary for a store, or nil if none.
Get the raw dictionary binary for a store, or nil if none.
Get the dictionary version for a store, or 0 if none.
Train a dictionary from existing segment data.
Reads Gorilla-compressed blobs (pre-zstd) from the store's segments, uses them as training samples for zstd dictionary building.
Options:
:sample_count- Number of segments to sample (default: 500):compression_level- zstd compression level for the cdict (default: 9):version- Dictionary version number (default: auto-increment)