Bidirectional Huffman coding

A. S. Fraenkel, S. T. Klein

Research output: Contribution to journalArticlepeer-review

47 Scopus citations


Under what conditions can Huffman codes be efficiently decoded in both directions? The usual decoding procedure works also for backward decoding only if the code has the affix property, i.e., both prefix and suffix properties. Some affix Huffman codes are exhibited, and necessary conditions for the existence of such codes are given. An algorithm is presented which, for a given set of codeword lengths, constructs an affix code, if there exists one. Since for many distributions there is no affix code giving the same compression as the Huffman code, a new algorithm for backward decoding of non-affix Huffman codes is presented, and its worst case complexity is proved to be linear in the length of the encoded text.

Original languageEnglish
Pages (from-to)296-307
Number of pages12
JournalComputer Journal
Issue number4
StatePublished - 1990
Externally publishedYes


Dive into the research topics of 'Bidirectional Huffman coding'. Together they form a unique fingerprint.

Cite this