pub fn train_dict(samples: &[&[u8]], max_dict_size: usize) -> Result<Vec<u8>>Expand description
Train a zstd dictionary from multiple sample files.
Each sample should be a complete JSON/NDJSON file’s bytes. The function
splits them into training fragments and calls zstd::dict::from_samples.
max_dict_size controls the max dictionary size in bytes (typical: 32768-131072).
Returns the trained dictionary bytes.