Design and analysis of dynamic Huffman codes
- 1 October 1987
- journal article
- Published by Association for Computing Machinery (ACM) in Journal of the ACM
- Vol. 34 (4), 825-845
- https://doi.org/10.1145/31846.42227
Abstract
A new one-pass algorithm for constructing dynamic Huffman codes is introduced and analyzed. We also analyze the one-pass algorithm due to Faller, Gallager, and Knuth. In each algorithm, both the sender and the receiver maintain equivalent dynamically varying Huffman trees, and the coding is done in real time. We show that the number of bits used by the new algorithm to encode a message containing t letters is t bits more than that used by the conventional two-pass Huffman scheme, independent of the alphabet size. This is best possible in the worst case, for any one-pass Huffman method. Tight upper and lower bounds are derived. Empirical tests show that the encodings produced by the new algorithm are shorter than those of the other one-pass algorithm and, except for long messages, are shorter than those of the two-pass method. The new algorithm is well suited for on-line encoding/decoding in data networks and for tile compression.Keywords
This publication has 5 references indexed in Scilit:
- Interval and recency rank source coding: Two on-line adaptive variable-length schemesIEEE Transactions on Information Theory, 1987
- A locally adaptive data compression schemeCommunications of the ACM, 1986
- Dynamic huffman codingJournal of Algorithms, 1985
- Variations on a theme by HuffmanIEEE Transactions on Information Theory, 1978
- A Method for the Construction of Minimum-Redundancy CodesProceedings of the IRE, 1952