next up previous
Next: Analysis of Arithmetic Coding Up: DATA COMPRESSION Previous: Design and Analysis of

ALGORITHM 673 Dynamic Huffman Coding

J. S. Vitter. ``ALGORITHM 673 Dynamic Huffman Coding,'' ACM Transactions on Mathematical Software, 15(2), June 1989, 158-167. Also appears in Collected Algorithms of ACM.

Publication version (Adobe pdf format)

Tech report version (gzip-compressed postscript)

We present a Pascal implementation of the one-pass algorithm for constructing dynamic Huffman codes that is described and analyzed in a companion paper [Vitter, 1987]. The program runs in real time; that is, the processing time for each letter of the message is proportional to the length of its codeword. The number of bits used to encode a message of t letters is less than t bits more than that used by the well-known two-pass algorithm. This is best possible for any one-pass Huffman scheme. In practice it uses fewer bits than all other Huffman schemes. The algorithm has applications in file compression and network transmission.



Jeff Vitter
2008-04-02