Lossless compression (1.3.1 b) Flashcards

(7 cards)

1
Q

What is dictionary encoding?

A

replaces common phrases with a reference to the original data
e.g Romeo_Romeo_where_art_tho_Romeo = Romeo_ _where_art_tho

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is run length encoding?

A

turns runs of identical data into a single value and the number of repetitions
e.g AAABBBBCCCCDDBBBBAAA =3A4B4C2D4B3A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Run length encoding

A

simplest compression method
also works with images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Run length encoding limits

A

does not work with files of natural origin
englishrarely features words with lots of repeated character
images often don’t have regions of identical colour (especially photographs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Dictionary encoding

A

replace repeated values with pointers to the original data
I am Sam Sam I am
token | data
———|———- 231123
1 | Sam
2 | I
3 | am
aren’t limited to individual words or characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Dictionary limitations

A

dictionary and compressed file can have a larger file size than the uncompressed file
need for a dictionary and pointers is a major overhead
if the file doesn’t have sections that repeat the efficiency reduces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Real life lossless

A

often combine multiple compression approaches
e.g ZIP files use both dictionary encoding and variable length encoding (Huffman encoding)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly