Function zstd::dict::from_continuous
source ยท pub fn from_continuous(
sample_data: &[u8],
sample_sizes: &[usize],
max_size: usize,
) -> Result<Vec<u8>>
Expand description
Train a dictionary from a big continuous chunk of data, with all samples contiguous in memory.
This is the most efficient way to train a dictionary,
since this is directly fed into zstd
.
sample_data
is the concatenation of all sample data.sample_sizes
is the size of each sample insample_data
. The sum of allsample_sizes
should equal the length ofsample_data
.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
.