Function zstd::dict::from_samples
source · pub fn from_samples<S: AsRef<[u8]>>(
samples: &[S],
max_size: usize,
) -> Result<Vec<u8>>
Expand description
Train a dictionary from multiple samples.
The samples will internally be copied to a single continuous buffer, so make sure you have enough memory available.
If you need to stretch your system’s limits,
from_continuous
directly uses the given slice.
samples
is a list of individual samples to train on.max_size
is the maximum size of the dictionary to generate.
The result is the dictionary data. You can, for example, feed it to CDict::create
.