Expand description
Structures and utilities used for compressing/encoding data into the Zstd format.
Structs§
- Compression
Level - A validated Zstandard compression level.
- Compression
Tuning - Optional low-level tuning layered over a
super::CompressionLevelpreset. - Encoder
std - A bounded-memory Zstandard encoder implementing
Write. - Encoder
Dictionary std - An owned, parsed dictionary reusable across independent frames.
- Encoder
Options std - Configuration for the bounded-memory streaming encoder.
- Encoder
Workspace - An owned compression workspace reusable without further allocation.
- Frame
Compressor - An interface for compressing arbitrary data with the ZStandard compression algorithm.
- Invalid
Compression Level - Error returned when a numeric compression level is outside the supported fast or positive ranges.
- Long
Distance Matching - Typed long-distance matching controls.
- Match
Generator Driver - This is the default implementation of the
Matchertrait. It allocates and reuses the buffers when possible. - Static
Encoder Workspace - A compression context whose working state lives entirely in caller storage.
Enums§
- Compression
File Type - Coarse file families used to choose the encoder’s internal starting point.
- Compression
Strategy - Stable strategy choices understood by the native Rust compressor.
- Content
Size Policy - Controls whether each independently emitted frame declares its decoded size.
- Dictionary
Error std - Error returned when dictionary bytes are not a usable Zstandard dictionary.
- Encode
Error std - Errors produced by the bounded streaming API.
- Encoder
Workspace Error - Errors reported while creating or using an encoder workspace.
- Sequence
- Sequences that a
Matchercan produce
Constants§
- DEFAULT_
FRAME_ CHUNK_ SIZE std - Default amount of input stored in each independent Zstandard frame: 8 MiB.
- DEFAULT_
MEMORY_ LIMIT std - Default maximum estimated resident working set: 96 MiB.
Traits§
- Matcher
- Trait used by the encoder that users can use to extend the matching facilities with their own algorithm making their own tradeoffs between runtime, memory usage and compression ratio
Functions§
- compress
- Convenience function to compress some source into a target without reusing any resources of the compressor
- compress_
to_ vec - Convenience function to compress some source into a Vec without reusing any resources of the compressor
- compress_
to_ vec_ with_ file_ type - Convenience function to compress some source into a Vec using a coarse file-type hint.
- compress_
to_ vec_ with_ path std - Convenience function to compress some source into a Vec using a path-based file-type hint.
- compress_
with_ file_ type - Convenience function to compress some source into a target using a coarse file-type hint.
- compress_
with_ path std - Convenience function to compress some source into a target using a path-based file-type hint.
- compression_
file_ type_ for_ path std - compression_
file_ type_ for_ path_ and_ data std - Classify using path first, then sample bytes if the path does not resolve to a known family.
- encode
std - Streams all input into a bounded-memory encoder.
- encode_
all std - Compresses all input and returns the resulting Zstandard archive.