Shows that the use of the lazy list processing technique from the world of functional languages allows, under certain conditions, the package-merge algorithm to be executed in much less space than is indicated by the O(nL) space worst-case bound. For example, the revised implementation generates a 32-bit limited code for the TREC distribution within 15 Mb of memory. It is also shown how a second observation-that in large-alphabet situations it is often the case that there are many symbols with the same frequency-can be exploited to further reduce the space required, for both unlimited and length-limited coding. This second improvement allows calculation of an optimal length-limited code for the TREC word distribution in under 8 Mb of memory; and calculation of an unrestricted Huffman code in under 1 Mb of memory.
[1]
David A. Huffman,et al.
A method for the construction of minimum-redundancy codes
,
1952,
Proceedings of the IRE.
[2]
Ian H. Witten,et al.
Managing Gigabytes: Compressing and Indexing Documents and Images
,
1999
.
[3]
Ian Holyer.
Functional programming with Miranda
,
1991
.
[4]
Shmuel Tomi Klein,et al.
Bounding the Depth of Search Trees
,
1993,
Comput. J..
[5]
Lawrence L. Larmore,et al.
A fast algorithm for optimal length-limited Huffman codes
,
1990,
JACM.
[6]
D. Huffman.
A Method for the Construction of Minimum-Redundancy Codes
,
1952
.