Summary
The C reference exposes fine-grained compression parameters (windowLog, hashLog, chainLog, searchLog, minMatch, targetLength, strategy) that users can tune independently. This is essential for domain-specific optimization.
C reference API
ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, 22)
ZSTD_CCtx_setParameter(cctx, ZSTD_c_hashLog, 18)
ZSTD_CCtx_setParameter(cctx, ZSTD_c_strategy, ZSTD_lazy2)
// ... etc
ZSTD_cParam_getBounds(param) // Query valid ranges
Current Rust state
- Only
CompressionLevel enum with fixed parameter sets
- No way to override individual parameters
Matcher trait allows custom algorithms but no parameter tuning of built-in ones
What needs to be implemented
CompressionParameters struct — all tunable parameters
- Builder API —
CompressionParameters::builder().window_log(22).hash_log(18).build()
- Bounds checking — validate parameter ranges
- Level-to-params mapping — each level maps to a default parameter set
- Integration with FrameCompressor — accept parameters instead of just level
Acceptance criteria
Dependencies
Time estimate
1d
Blocked by
Summary
The C reference exposes fine-grained compression parameters (windowLog, hashLog, chainLog, searchLog, minMatch, targetLength, strategy) that users can tune independently. This is essential for domain-specific optimization.
C reference API
Current Rust state
CompressionLevelenum with fixed parameter setsMatchertrait allows custom algorithms but no parameter tuning of built-in onesWhat needs to be implemented
CompressionParametersstruct — all tunable parametersCompressionParameters::builder().window_log(22).hash_log(18).build()Acceptance criteria
Dependencies
Time estimate
1d
Blocked by