WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Huffman Encoding

encoding example
1
2
3
4
5
In run-length encoding, one breaks up the data into runs of identical elements of varying lengths. Huffman encoding in particular breaks the datain this case, an array of 1's and 0'sinto distinct blocks of three.
The tabs below the encoded array show to which codewords each triplet is assigned, with the "key" to the encoding prepended to the encoded array. You can scroll through the five different examples of starting arrays by changing the value of the "encoding example" controls.
See Details for a more comprehensive explanation of the encoding.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.