The windowed Huffman algorithm is introduced. The Huffman code tree is constructed based on the probabilities of symbols' occurrences within finite history in this windowed algorithm. A window buffer is used to store the most recently processed symbols. Experimental results show that by choosing a suitable window size, the length of codes generated by the windowed Huffman algorithm is shorter than those generated by the static Huffman algorithm, dynamic algorithms, and the residual Huffman algorithm, and even smaller than the first-order entropy. Furthermore, three policies to adjust window size dynamically are also discussed. The windowed Huffman algorithm with an adaptive-size window performs as well as, or better than, that with an optimal fixed-size window. The new algorithm is well suited for online encoding and decoding of data with varying probability distributions.
[1]
Jeffrey Scott Vitter,et al.
Design and analysis of dynamic Huffman coding
,
1985,
26th Annual Symposium on Foundations of Computer Science (sfcs 1985).
[2]
Jeffrey Scott Vitter,et al.
Design and analysis of dynamic Huffman codes
,
1987,
JACM.
[3]
D. Huffman.
A Method for the Construction of Minimum-Redundancy Codes
,
1952
.
[4]
Mohammed Ghanbari.
Arithmetic coding with limited past history
,
1991
.
[5]
Robert G. Gallager,et al.
Variations on a theme by Huffman
,
1978,
IEEE Trans. Inf. Theory.