Compression Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is compression

A

Compression is reducing the amount of data.

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

What kind of compression is there?

A

Lossy and lossless

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

What is lossy compression?

A

Compressing a file by deleting some of the data that is not very crucial.
• Some data is permanently lost when compressed
• Good for compressing things where some quality can be sacrificed – e.g. a photo or a song

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

What is lossless compression?

A

Lossless compression works by recording patterns in the data rather than the data itself.
• No data is lost through compression
• Good for compressing things such as code files where data cannot be removed

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

What is RLE?

A
  • Patterns stored – e.g. 10 blue pixels, 5 green pixels etc.
  • Compresses the file without loss of data
  • Has to be patterns or lots of repetition otherwise it is not very effective
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the dictionary?

A
  • Repeated data is assigned a specific binary code – e.g. the word “cat” might be assigned 00110101
  • Compresses the file without loss of data
  • Binary codes take up less space in memory than the ASCII values for each individual letter/character
  • Has to be a lot of repetition otherwise it is not very effective
  • Have to also store the dictionary (list of codes) so final file size may not be as small
How well did you know this?
1
Not at all
2
3
4
5
Perfectly