Changes to Huffman coding
TechWritereditor · 4 Dec 2026, 12:33 · “New page”
+ added − removed (first version)
Title
Removed:
Added: Huffman coding
Short description
Removed:
Added: Optimal prefix code for lossless compression (1952)
Type
Removed:
Added: technology
Summary
Removed:
Added: Huffman coding is a lossless data compression method that gives short binary codes to common symbols and longer codes to rare ones. It was devised by David A. Huffman as a graduate student at MIT and published in 1952.
Fact box
Removed:
Added: Type: Lossless data compression algorithm
Added: Inventor: David A. Huffman
Added: Published: September 1952
Added: Publication: Proceedings of the IRE, vol. 40, no. 9
Added: Algorithm class: Greedy algorithm
Added: Code type: Variable-length prefix code
Article
Added: **Huffman coding** is a method of lossless data compression that builds a variable-length code from how often each character or symbol appears, so that frequent symbols get short codes and rare symbols get long ones.[^1] The 1952 paper describing it is one of the most-cited papers in information theory.[^2]
Added: ## History
Added:
Added: In 1951 [[David A. Huffman]] was a graduate student on an electrical engineering course at the Massachusetts Institute of Technology taught by Robert Fano. Fano let students choose between sitting a final exam and writing a term paper; Huffman chose the paper, whose topic was finding the most efficient code. Fano had not told the class that this was an unsolved problem, and his own method did not always produce the best possible code.[^3] Huffman's solution always produced a code with the lowest possible average message length.[^3] He published it in September 1952 as "A Method for the Construction of Minimum-Redundancy Codes" in the *Proceedings of the IRE*.[^1][^3]
Added:
Added: ## How it works
Added:
Added: The encoder first counts how often each symbol occurs. Each symbol becomes a one-node tree whose weight is its frequency. The two lightest trees are repeatedly joined under a new parent whose weight is the sum of the two, until a single tree remains.[^1][^2] Reading the path from the root to each symbol, one bit per level, gives that symbol's code: common symbols sit near the root and get short codes, while rare symbols sit deeper and get longer ones.[^1] Because no code is the beginning of another code (a "prefix code"), a decoder can read the bit stream without separators.[^1] A compressed file must also carry a description of the tree so that the decoder can rebuild it.[^2]
Added:
Added: Huffman coding is optimal when each symbol is given its own whole-bit code word. Arithmetic coding can compress further by using fractions of a bit, at the cost of more complexity.[^1] Variants include adaptive Huffman coding, which updates the tree as data arrives.[^1]
Added:
Added: ## Uses
Added:
Added: Huffman coding became widely used for compressing and transmitting data in [[Fax]] machines, [[Modem]]s, computer networks and high-definition television.[^4] It can be applied to text, images, music and video, provided the common items in the data are identified and given short bit sequences.[^2]
Added:
Added: ## See also
Added: - [[David A. Huffman]]
Added: - [[Claude Shannon]]
Added: - [[Hamming code]]
Added: - [[ZIP (file format)]]
Sources
Removed:
Added: huffman coding | https://xlinux.nist.gov/dads/HTML/huffmanCoding.html | National Institute of Standards and Technology (Dictionary of Algorithms and Data Structures)
Added: Huffman Coding (CS106B background) | https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1264/assignments/7-huffman_background/ | Stanford University
Added: Discovery of Huffman Codes | https://old.maa.org/press/periodicals/convergence/discovery-of-huffman-codes | Mathematical Association of America (Convergence) | 2015-07-01
Added: UC Santa Cruz mourns the death of David Huffman | https://www1.ucsc.edu/news_events/press_releases/archive/99-00/10-99/huffmem.htm | University of California, Santa Cruz | 1999-10-14
Categories
Removed:
Added: Data compression
Added: Milestones in computing
Other names
Removed:
Added: Huffman code
Added: Huffman encoding
Added: Huffman algorithm