pub struct CoverOptions {
pub k: u32,
pub d: u32,
pub steps: u32,
pub split_point: f64,
pub shrink: Option<u32>,
}dict-builder only.Expand description
Tuning for COVER training, the knobs of the reference’s
ZDICT_cover_params_t.
The defaults are those zstd --train-cover starts from: d of 8, a search
over k in four steps, every sample both building and scoring.
Fields§
§k: u32Segment size in bytes. Zero searches 50..=2000 when optimizing.
d: u32Dmer size in bytes, at most k. Zero searches 6 and 8 when optimizing.
steps: u32How many values of k the search tries; zero is 40.
split_point: f64Share of the samples dictionaries are built from, in (0, 1]; the rest
score them. At 1 every sample does both. Zero or below is the trainer’s
default: 1 for COVER, 0.75 for FastCOVER.
shrink: Option<u32>Try the content’s last 256, 512, 1024, … bytes, each finalized into a
dictionary of its own, and keep the first whose scoring samples
compress to at most this many percent more than with the whole content
(upstream zstd COVER_selectDict). A dictionary so found is its header
plus that tail, so none is smaller than the header plus 256 bytes. A
search cuts its winner down this way; the parameters it chooses are
unchanged.