Huffman coding: Difference between revisions

Content deleted Content added
AaronSw (talk | contribs)
No edit summary
AaronSw (talk | contribs)
No edit summary
Line 28:
(This variation requires that a [[frequency table]] or other hint as to the encoding must be stored with the compressed text; implementations employ various tricks to store these tables efficiently.)
 
A variation called "'''adaptive Huffman coding'"'' calculates the frequencies dynamically based on recent actual frequencies in the source string. This is somewhat related to the [[LZ77|LZ]] family of algorithms.
 
Most often, the weights used in implementations of Huffman coding represent numeric probabilities, but the algorithm given above does not require this; it requires only a way to order weights and to add them. Huffman Template algorithm enables to use non-numerical weights (costs, frequences).