Skip to main content

MIN_TRAINED_DICT_SIZE

Constant MIN_TRAINED_DICT_SIZE 

Source
pub const MIN_TRAINED_DICT_SIZE: usize = _; // 28usize
Available on crate feature dict-builder only.
Expand description

Smallest size a trained dictionary can occupy, whatever it was trained on.

The magic number, the dictionary ID, the three repeat offsets and the shortest content the writers emit are unconditional; a real dictionary is larger still, since the entropy tables between them are never empty. Use it to reject an impossible dict_size before spending the corpus: the training entry points can only discover the true bound once those tables are built.