English

Worst-Case Optimal Adaptive Prefix Coding

Information Theory 2008-12-18 v1 math.IT

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 HH is the empirical entropy of the input string ss. 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 ss 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.

Keywords

Cite

@article{arxiv.0812.3306,
  title  = {Worst-Case Optimal Adaptive Prefix Coding},
  author = {Travis Gagie and Yakov Nekrich},
  journal= {arXiv preprint arXiv:0812.3306},
  year   = {2008}
}
R2 v1 2026-06-21T11:53:08.402Z