Worst-Case Optimal Adaptive Prefix Coding
Travis Gagie, Yakov Nekrich

TL;DR
This paper presents a worst-case optimal adaptive prefix coding algorithm that encodes and decodes each character in constant time, improving speed over previous methods while maintaining near-optimal compression length.
Contribution
It introduces a new adaptive Shannon coding algorithm with worst-case O(1) encoding and decoding time, surpassing prior amortized-time solutions.
Findings
Achieves worst-case O(1) encoding and decoding time per character.
Stores input in near-optimal bits proportional to empirical entropy.
Proves the encoding length is worst-case optimal up to lower order terms.
Abstract
A common complaint about adaptive prefix coding is that it is much slower than static prefix coding. Karpinski and Nekrich recently took an important step towards resolving this: they gave an adaptive Shannon coding algorithm that encodes each character in (O (1)) amortized time and decodes it in (O (\log H)) amortized time, where is the empirical entropy of the input string . For comparison, Gagie's adaptive Shannon coder and both Knuth's and Vitter's adaptive Huffman coders all use (\Theta (H)) amortized time for each character. In this paper we give an adaptive Shannon coder that both encodes and decodes each character in (O (1)) worst-case time. As with both previous adaptive Shannon coders, we store in at most ((H + 1) |s| + o (|s|)) bits. We also show that this encoding length is worst-case optimal up to the lower order term.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Advanced Wireless Communication Techniques · Error Correcting Code Techniques
