Skip to main content

train_dictionary

Function train_dictionary 

Source
pub fn train_dictionary<S: AsRef<[u8]>>(
    samples: &[S],
    options: DictionaryTrainerOptions,
) -> Result<Vec<u8>, DictionaryTrainingError>
Available on crate feature dict_builder only.
Expand description

Trains a standard formatted dictionary from independent representative samples.

The content dictionary is selected with the native COVER-style trainer. The literal table is learned from the sample distribution; portable predefined sequence distributions provide complete initial FSE tables. The result has a dictionary ID and can be passed directly to crate::encoding::EncoderDictionary or crate::decoding::Dictionary::decode_dict.