Repository navigation
fuzz: compress with the advanced compression parameters (Part of #118) - #122
Merged
Merged
Conversation
The compress target now also sets the parameters added in #121: strategy, hash, chain and search log, minimum match, target length and literal compression mode, each left at the level's value a third of the time, on both libzstd (ZSTD_CCtx_setParameter) and zstd-native (StreamEncoder and Compressor setters). The new field comes after the dictionary in EncParams, so existing corpus entries keep their meaning. The one-shot path no longer needs the level's window log: Compressor has set_window_log now. Inputs are capped at 48 KiB from btlazy2 on (by level or strategy), and hash and chain logs at 20. 32 workers for 10 minutes on the EPYC host (~3.7M inputs): no mismatch, no crash.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #118, the follow-up listed in #121.
What
The
compressfuzz target now also sets the compression parameters added in #121, on both sides:ZSTD_CCtx_setParameter;StreamEncoderandCompressorsetters.The parameters:
ZSTD_c_strategy: 1-9;hashLog,chainLog: 6-20;searchLog: 1-10;minMatch: 3-7;targetLength: 0, small values, or powers of two up to 131072;literalCompressionMode: auto, enable, disable.Each one is left at the level's value a third of the time. The output must still be byte-identical to libzstd's, and both decoders must read it back.
Details
cparamsfield comes after the dictionary inEncParams, so existing corpus entries keep their meaning; their trailing bytes now pick parameters.Compressor::set_window_logexists now.RawCCtx::set_cparams: a raw FFI setter;CParameter::Strategycan't express 0, the level's value.Testing
cargo +nightly fuzz, ~3.7M inputs): no mismatch, no crash.-D warnings) and fmt pass on the fuzz crate.