ans 0.1.0

Asymmetric Numeral Systems (rANS) entropy coding primitives
Documentation
  • Coverage
  • 28.57%
    6 out of 21 items documented0 out of 10 items with examples
  • Size
  • Source code size: 20.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • arclabs561/ans
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • arclabs561

Asymmetric Numeral Systems (ANS) entropy coding primitives.

This crate provides a small, dependency-light implementation of rANS (range Asymmetric Numeral Systems), suitable as a building block for higher-level compression schemes (e.g. “bits-back” constructions used in ROC / set coding).

Design

  • Explicit model: callers provide counts (frequencies) and the precision.
  • Small surface: encode/decode with a [FrequencyTable].
  • No I/O: this crate is pure in-memory coding.

Notes

  • This is not tuned for maximum speed; it is meant to be correct and easy to integrate.
  • Encoding returns a byte vector in a stack format: the decoder consumes bytes from the end (LIFO). This avoids reversing buffers.