Compression

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/10

encourage image

There's no tags or description

Looks like no tags are added yet.

11 Terms

1
New cards

What are the two main types of compression?

Run Length Encoding and Huffman Coding

2
New cards

How does RLE work?

Takes sequences of repeated values and compresses them.

3
New cards

Use RLE to compress HHH JJJJ LL

3H 4J 2L

4
New cards

Use RLE to compress ⬜⬛⬛⬛⬛⬜ where white = 1 and black = 0

11 40 11

5
New cards

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.

6
New cards

Where will a character with high frequency be on a Huffman tree?

High up

7
New cards

Where do you start when interpreting a Huffman tree?

The root node

8
New cards

Where is the root node on a Huffman tree?

The very top one

9
New cards

If you take a left branch on a Huffman tree, which character do you add to your code?

0

10
New cards

If you take a right branch on a Huffman tree, which character do you add to your code?

1

11
New cards

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.