Week 8 Compression Flashcards

(11 cards)

1
Q

What is compression?

A

The process of reducing the number of bits required to represent data

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

Why might compression be used? [3]

A
  • Reduce the storage requirements;
  • Ensure faster transmission;
  • Comply with file size restrictions (e.g. on email)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Lossless Compression

A

When decompressing the image, the original uncompressed image is restored exactly as it was.

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

Lossy Compression

A

When irrelevant data is discarded such that when decompressed, the original file is not recovered.

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

State the advantages of lossless compression [2]

A

The file can be reproduced exactly as it was originally;
A. The quality of an image/sound/video would not be reduced.

The original data can be fully recovered if lossless compression has been used // lossless data compression can be reversed;
NE. no data is lost NE. no loss of quality

The original data cannot be recovered if lossy compression has been used // lossy compression cannot be reversed // the data is degraded by lossy compression;
A. redundant / less important data removed
NE. data is lost
NE. quality is reduced

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

State one disadvantage of lossless compression [2]

A

Not as big a file size reduction as lossy compression

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

State one advantage of lossy compression [1]

A

Greater file size reduction than lossless compression

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

State two disadvantages of lossy compression [2]

A

May result in lower quality image/sound; Unable to recover discarded data

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

When can run-length encoding (RLE) be used with bitmaps?

A

If three or more consecutive pixels contain the same bit pattern, then a run of cells can be compressed.

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

How does RLE reduce file size?

A

The run of identical pixels can be stored in two bytes: number in the run; colour of the pixels.

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

Describe how dictionary-based compression works

A
  • (Variable) length strings of symbols/substrings of original data are represented by single tokens;
  • A table/dictionary is formed using the tokens as the keys/index;
  • The strings of symbols are used as the entries;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly