Shannon-Fano coding in data compression is a variable-length encoding based on the frequency of each character. The most frequent character is assigned 0, the next is assigned 10, the next 110, etc.
Shannon-Fano is a minimal prefix code. Huffman coding is optimal for character encoding (one character-one code word) and simple to program. Arithmetic coding is better still, since it can allocate fractional bits, but more complicated.
Fact-index.com financially supports the Wikimedia Foundation. Displaying this page does not burden Wikipedia hardware resources. This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.