Skip to main content

Module compress

Module compress 

Source
Expand description

Per-chunk compression with an adaptive “is this worth it?” gate.

Every chunk is compressed independently. That costs a little ratio versus a single solid stream, and buys three things this engine needs: chunks can be processed on any worker in any order, a resumed transfer can skip individual chunks, and one corrupt chunk cannot poison the ones after it.

Structs§

Codec
Reusable codec state for one worker.
Encoded
What the encoder decided for one chunk.
FileHint
What we know about a chunk before looking at its bytes.

Enums§

Algorithm
Compression algorithm for a chunk payload.

Functions§

compress_into
Compress using the calling thread’s Codec.
decompress_into
Decompress using the calling thread’s Codec.
is_incompressible_extension
Does this extension name a format that is already entropy-coded?
with_codec
Run f with the calling thread’s codec.