Module compression

Module compression 

Source
Expand description

Rate-coded compression helpers built on generic rate backends. Rate-coded compression helpers (AC/rANS) with optional framing.

The functions in this module implement lossless byte compression by combining:

  • a predictive rate model (RateBackend) that emits per-symbol PDFs,
  • an entropy coder (AC or rANS),
  • optional framing metadata for robust decompression.

Enums§

FramingMode
Wire format mode for rate-coded payloads.

Functions§

compress_rate_bytes
Compress bytes using a predictive rate backend and entropy coder.
compress_rate_size
Return compressed size (in bytes) for data using rate coding.
compress_rate_size_chain
Return compressed size (in bytes) for concatenated slices under one stream.
decompress_rate_bytes
Decompress bytes produced by compress_rate_bytes.