Expand description
zstd encoder of zrip: levels -7 to 4,
the Fast and DFast match finders, the block encoder, and the one-shot,
context, streaming and push APIs. Use zrip unless you need only the
compressor.
Modules§
- adaptive
- Compression level adaptation for a sender whose bottleneck moves.
- context
CompressContext, which reuses tables and buffers across frames, and the dictionary state it prepares once.- push
- Push-style (sans-io) encoding: the caller feeds input chunks and drains frame bytes into its own buffers.
- strategy
- Level parameters: the settings each level runs with, and how the input
size and
Optionsadjust them. - streaming
FrameEncoder, a streaming encoder overstd::io::Write.
Functions§
- compress
- Compresses
inputinto one frame atlevel(-7..=4; -8 runs as -7, 0 as 1). The frame records the content size and a checksum. Other levels fail withCompressError::InvalidLevel. - compress_
into compressintooutput. Returns the frame size. Fails withCompressError::OutputTooSmallif the frame does not fit;outputthen holds a partial frame.zrip::compress_bound(input.len())bytes are always enough.- compress_
opts compresswithstrategy::Options: a larger window or long distance matching. The window shrinks to the input.- compress_
with_ dict compresswithdict. Decoders need the same dictionary.- compress_
with_ params compresswith explicitparamsinstead of a level. The table and window logs are clamped to their valid ranges and to the input size.