Skip to main content

train_zstd_dictionary

Function train_zstd_dictionary 

Source
pub fn train_zstd_dictionary(
    samples: &[Vec<u8>],
    max_size: usize,
) -> Option<Vec<u8>>
Expand description

Train a zstd dictionary from a sample of payloads.

Returns None when the sample is too small for zstd’s dictionary builder to produce a useful dictionary; callers should treat this as “ship without a dictionary” rather than an error.