Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 852 Bytes

index.md

File metadata and controls

19 lines (12 loc) · 852 Bytes

Compression

Library for performing compression/decompression of data either as:

  1. Data streams using raw codecs like Deflate/Snappy/GZip/Zstd.
  2. Archives storing multiple files (e.g. Zip/Tar)

Stream Codecs

Encoders/decoders of byte streams all implement the crate::Transform trait which supports incremental processing of (un-)compressed inputs chunk by chunk. This interface is designed with the use-case data not being able to fit completely in memory all at once. For cases where compression/decompression of small buffers, use the transform_to_vec() helper which aims to properly hint to the codec that all input/output buffers are available right away.

References

DEFLATE:

Zlib's algorithm specifics: