Huffman Coding

Why Trust Techopedia

What Does Huffman Coding Mean?

Huffman coding is a lossless data encoding algorithm. The process behind its scheme includes sorting numerical values from a set in order of their frequency. The least frequent numbers are gradually eliminated via the Huffman tree, which adds the two lowest frequencies from the sorted list in every new “branch.” The sum is then positioned above the two eliminated lower frequency values, and replaces them in the new sorted list. Each time a new branch is created, it moves the general direction of the tree either to the right (for higher values) or the left (for lower values). When the sorted list is exhausted and the tree is complete, the final value is zero if the tree ended on a left number, or it is one if it ended on the right. This is a method of reducing complex code into simpler sequences and is common in video encoding.

Advertisements

Techopedia Explains Huffman Coding

Data compression has a history that predates physical computing. Morse code, for example, compresses information by assigning shorter codes to characters that are statistically common in the English language (such as the letters “e” and “t”). Huffman coding came about as the result of a class project at MIT by its then student, David Huffman.

In 1951, Huffman was taking a class under Robert Fano, who (with the help of an engineer and mathematician by the name of Claude Shannon) invented an efficiency scheme known as Shannon-Fano coding. When Fano gave his class the opportunity to either write a term paper or take a final exam, Huffman chose the term paper, which sought to find an efficient binary coding method. This resulted in Huffman coding, which by the 1970s had become a prominent digital encoding algorithm.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.