Description: Due to the current digital communication in general use binary symbols, so the Huffman coding of binary is the most common, the encoding procedure is as follows:1, the source symbols according to the probability from big to small order 2, to the two smallest source symbols of each is assigned a code "0" and "1", then the two source symbols are combined into a new symbol, and the two smallest probability and probability as a new symbol, the result is a only (n-1) new source source symbols (the original hypothesis number symbols required coding for n), called the first cut the source S1 source 3, cut the source S1 symbols according to probability from big to small order of rank, repeat steps 2, got only containing (n-2) a symbolic reduction source S2 4, repeat the above steps, until reduced source only two symbols, the remaining two symbol probability and will be 1, these two symbols each assigned a symbol "0" and "1", from the beginning of last stage reduced source, according to code pa
To Search:
File list (Check if you may need any files):
huffman.cpp