The main problem in source coding is to ensure that the most probable source symbols are represented by the shortest codewords, and the less probable by longer codewords as necessary, the weighted average codeword length being minimized within the bounds of Kraft's inequality. The most widely used methods for ensuring this are Huffman coding and Shannon–Fano coding; the former is more efficient for a given extension of the source but the latter is computationally simpler. In either case, a large extension of the source may be necessary to approach the limiting compression factor given by the source coding theorem.
See also Shannon's model. Compare channel coding.
"source coding." A Dictionary of Computing. . Encyclopedia.com. (December 12, 2018). https://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/source-coding
"source coding." A Dictionary of Computing. . Retrieved December 12, 2018 from Encyclopedia.com: https://www.encyclopedia.com/computing/dictionaries-thesauruses-pictures-and-press-releases/source-coding