Shannon-Fano coding
Shannon-Fano coding is an early probability-based method for building variable-length codes.
What it is
Shannon-Fano coding gives shorter codes to more likely symbols and longer codes to less likely symbols. That core idea is still central to compression: common things should be cheap to write.
Origin
The method came from early information theory work associated with Claude Shannon and Robert Fano. It belongs to the same intellectual period that turned compression from a collection of clever tricks into a mathematical engineering field.
How it works
The symbols are sorted by probability, then split into groups with roughly equal total probability. One side receives one bit value, the other side receives the other bit value. The process repeats until each symbol has a code.
This creates useful variable-length codes, but the splitting step does not always produce the best possible prefix code.
Difference from Huffman coding
Shannon-Fano coding works from the top down by splitting groups. Huffman coding works from the bottom up by repeatedly joining the least likely symbols. That bottom-up approach is why Huffman coding became the standard textbook example of an optimal prefix-code construction.