Huffman coding

Under what conditions does a Huffman encoding make a string incompressible? This is when all the characters appear with equal frequency / probability? And if so, how to show this is true?

+5
source share
3 answers

In a nutshell, the Huffman coding assigns smaller bit length codes to more probable binary combinations and longer ones to less probable ones. If everyone is equally likely, you will find that there is no real advantage, because compression due to shorter codes is lost due to equally longer codes.

+7
source

Two factors come to my mind:

  • If you have similar element probabilities, then little compression will be
  • (, ), (aka dictionary - , ?) , .
+7

, , . ( , stackoverflow TeX, , math.stackexchange.com. .)

, , n, 1..n. , , , p (k). , , - , : -sum (p (k) log (p (k)), k = 1..n)/log (2). log (n)/log (2), , (1/n), , . , , 8, ( n <= 256).

, . , . - , , . , , .

, . 100M- enwik8 , . ( ) . , LZ77, LZMA, Burrows-Wheeler . LZ77, gzip, .

, , , , .

enter image description here

+7
source

All Articles