Windowed Huffman Coding with Limited Distinct Symbols

Abstract The adaptive Huffman coding with a window of limited distinct symbols is proposed. The window buffer is used to store a specified number of distinct symbols most recently processed. The total number of symbols within the window may vary, but number of distinct symbols does not exceed a specified value. The adaptive Huffman tree is constructed based on the probability distribution of symbols within the window. Then, a variant of the proposed method is introduced. The proposed variant uses two windows. A small primary window buffer is used to store the most recently processed symbols. A comparatively large secondary window buffer is used to store more past processed symbols. The two separate Huffman tree are constructed based on the probabilities of symbols within the two windows. A symbol is encoded using first Huffman tree if it is found in the first window. Otherwise, the symbol is encoded using second Huffman tree if it is found in the second window. The first proposed technique comparatively offers better results than its counterpart for most of the file type. The performance of the second proposed technique is also close to the other techniques.