Content deleted Content added
Reverted good faith edits by 62.172.237.82 (talk): Punctuation |
→Compression: use {{zwsp}} in caption, MOS:UPRIGHT |
||
Line 163:
===Compression===
[[File:Huffman_coding_visualisation.svg|thumb|
[[Image:Huffman coding example.svg|thumb|A source generates 4 different symbols <math>\{a_1 , a_2 , a_3 , a_4 \}</math> with probability <math>\{0.4 ; 0.35 ; 0.2 ; 0.05 \}</math>. A binary tree is generated from left to right taking the two least probable symbols and putting them together to form another equivalent symbol having a probability that equals the sum of the two symbols. The process is repeated until there is just one symbol. The tree can then be read backwards, from right to left, assigning different bits to different branches. The final Huffman code is:
|