跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2201.02514 · v4

Efficiency of ANS Entropy Encoders

首次提交 2022-01-07 23:56
版本更新 2026-11-18 05:09
雷达观测 2026-11-19 19:08
arXiv ↗PDF ↗

摘要

Asymmetric Numeral Systems (ANS) is a class of entropy encoders that had an immense impact on the data compression, substituting arithmetic and Huffman coding. It was studied by different authors but the precise asymptotics of its redundancy (in relation to the entropy) was not completely understood. We obtain optimal bounds for the redundancy of the tabled ANS (tANS), the most popular ANS variant. Given a sequence a1,a2,…,ana_1,a_2,\ldots,a_n of symbols from an alphabet {0,1,…,σ−1}\{0,1,\ldots,σ-1\} such that each symbol aa occurs in it faf_a times and n=2rn=2^r, the tANS encoder using Duda's ``precise initialization'' to fill tANS tables transforms this sequence into a bit string of the following length (the frequencies are not included in the encoding): ∑a∈[0..σ)fa⋅log⁡nfa+O(σ+r)\sum\limits_{a\in[0..σ)}f_a\cdot\log\frac{n}{f_a}+O(σ+r), where O(σ+r)O(σ+r) can be bounded by σlog⁡e+rσ\log e+r. The rr-bit term is an artifact indispensable to ANS; the rest incurs a redundancy of O(σn)O(\fracσ{n}) bits per symbol. We complement this by examples showing that an Ω(σ+r)Ω(σ+r) redundancy is necessary. We argue that similar examples exist for most adequate initialization methods for tANS. Thus, we refute Duda's conjecture that the redundancy is O(σn2)O(\fracσ{n^2}) bits per symbol. We also propose a variant of the range ANS (rANS), called rANS with fixed accuracy, parameterized by k≥1k\ge 1 that in certain conditions might be faster than the standard rANS because it avoids slow explicit division operations. We bound the redundancy for our rANS variant by n2k−1log⁡e+r+k\frac{n}{2^k-1}\log e+r+k.

作者备注:27 pages, 5 figures, 1 table, 2 listings

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

本站首次收录为 v4,暂无更早版本可对照。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v4 · 2026-11-18 05:09 · 最新观测版本

Efficiency of ANS Entropy Encoders

Asymmetric Numeral Systems (ANS) is a class of entropy encoders that had an immense impact on the data compression, substituting arithmetic and Huffman coding. It was studied by different authors but the precise asymptotics of its redundancy (in relation to the entropy) was not completely understood. We obtain optimal bounds for the redundancy of the tabled ANS (tANS), the most popular ANS variant. Given a sequence a1,a2,…,ana_1,a_2,\ldots,a_n of symbols from an alphabet {0,1,…,σ−1}\{0,1,\ldots,σ-1\} such that each symbol aa occurs in it faf_a times and n=2rn=2^r, the tANS encoder using Duda's ``precise initialization'' to fill tANS tables transforms this sequence into a bit string of the following length (the frequencies are not included in the encoding): ∑a∈[0..σ)fa⋅log⁡nfa+O(σ+r)\sum\limits_{a\in[0..σ)}f_a\cdot\log\frac{n}{f_a}+O(σ+r), where O(σ+r)O(σ+r) can be bounded by σlog⁡e+rσ\log e+r. The rr-bit term is an artifact indispensable to ANS; the rest incurs a redundancy of O(σn)O(\fracσ{n}) bits per symbol. We complement this by examples showing that an Ω(σ+r)Ω(σ+r) redundancy is necessary. We argue that similar examples exist for most adequate initialization methods for tANS. Thus, we refute Duda's conjecture that the redundancy is O(σn2)O(\fracσ{n^2}) bits per symbol. We also propose a variant of the range ANS (rANS), called rANS with fixed accuracy, parameterized by k≥1k\ge 1 that in certain conditions might be faster than the standard rANS because it avoids slow explicit division operations. We bound the redundancy for our rANS variant by n2k−1log⁡e+r+k\frac{n}{2^k-1}\log e+r+k.

查看此版本解读 →查看此版本原文 ↗