Module coders

Module coders 

Source
Expand description

Entropy coders for rwkvzip.

This module provides both Arithmetic Coding (AC) and rANS coders.

§Coder Selection

  • Arithmetic Coding (AC): Optimal compression ratio, slightly slower. Best for small files or maximum compression.
  • rANS: Near-optimal compression with better throughput, especially with SIMD on x86_64. Best for larger files.

Re-exports§

pub use ac::p_min;
pub use ac::quantize_pdf_to_cdf;
pub use ac::quantize_pdf_to_cdf_inplace;
pub use ac::softmax_pdf;
pub use ac::softmax_pdf_floor;
pub use ac::softmax_pdf_floor_inplace;
pub use ac::softmax_pdf_inplace;
pub use ac::ArithmeticDecoder;
pub use ac::ArithmeticEncoder;
pub use ac::CDF_TOTAL;
pub use rans::cdf_for_symbol;
pub use rans::quantize_pdf_to_rans_cdf;
pub use rans::quantize_pdf_to_rans_cdf_with_buffer;
pub use rans::BlockedRansDecoder;
pub use rans::BlockedRansEncoder;
pub use rans::Cdf;
pub use rans::RansDecoder;
pub use rans::RansEncoder;
pub use rans::ANS_BITS;
pub use rans::ANS_HIGH;
pub use rans::ANS_LOW;
pub use rans::ANS_TOTAL;
pub use rans::BLOCK_SIZE;
pub use rans::SimdRansDecoder;
pub use rans::SimdRansEncoder;
pub use rans::RANS_LANES;

Modules§

ac
Arithmetic Coder implementation for rwkvzip.
rans
rANS (range Asymmetric Numeral System) coder with SIMD optimizations.