1/10
Looks like no tags are added yet.
What are the two main types of compression?
Run Length Encoding and Huffman Coding
How does RLE work?
Takes sequences of repeated values and compresses them.
Use RLE to compress HHH JJJJ LL
3H 4J 2L
Use RLE to compress ⬜⬛⬛⬛⬛⬜ where white = 1 and black = 0
11 40 11
How does Huffman Coding work?
Assigns each character a code. The more often a character appears in the message, the shorter its code will be.
Where will a character with high frequency be on a Huffman tree?
High up
Where do you start when interpreting a Huffman tree?
The root node
Where is the root node on a Huffman tree?
The very top one
If you take a left branch on a Huffman tree, which character do you add to your code?
0
If you take a right branch on a Huffman tree, which character do you add to your code?
1
What are the two main benefits to Huffman coding?
There is no way a string can be misinterpreted; It works on any string and not just repeating ones like RLE.