Expand description
Entropy coding for JPEG XL encoder.
This module provides ANS (Asymmetric Numeral Systems) and Huffman encoding implementations for compressing symbols in the JXL bitstream.
Re-exports§
pub use ans::ANS_LOG_TAB_SIZE;pub use ans::ANS_MAX_ALPHABET_SIZE;pub use ans::ANS_SIGNATURE;pub use ans::ANS_TAB_MASK;pub use ans::ANS_TAB_SIZE;pub use ans::ANSEncodingHistogram;pub use ans::ANSHistogramStrategy;pub use ans::AnsEncoder;pub use ans::get_population_count_precision;pub use histogram::HISTOGRAM_ROUNDING;pub use histogram::Histogram;pub use histogram::MIN_DISTANCE_FOR_DISTINCT;pub use histogram::histogram_distance;pub use histogram::histogram_kl_divergence;
Modules§
- ans
- ANS (Asymmetric Numeral Systems) encoder.
- ans_
decode - histogram
- Histogram data structure with entropy calculations.
Structs§
- Cluster
Result - Result of clustering histograms.
- Huffman
Table - Result of building a Huffman table.
Enums§
- Clustering
Type - Clustering aggressiveness level.
- Entropy
Type - Entropy coding method - affects header cost estimation for clustering.
- Lz77
Method - LZ77 method selection.
Functions§
- build_
and_ store_ huffman_ tree - Builds and stores a Huffman table from a histogram.
- cluster_
histograms - Full clustering pipeline.
- convert_
bit_ depths_ to_ symbols - Converts code depths to canonical Huffman codes.
- create_
huffman_ tree - Creates an optimal Huffman tree from symbol frequencies.
- encode_
context_ map - Encode context map to bitstream.
- fast_
cluster_ histograms - Fast k-means-like clustering.
- inverse_
move_ to_ front_ transform - Inverse move-to-front transform (for testing).
- move_
to_ front_ transform - Move-to-front transform for better compression.
- store_
huffman_ tree - Stores a full Huffman tree to the bitstream.
- write_
huffman_ tree - Compresses a depth array into RLE-encoded code length codes.