Spotting the lossy technique
Which of the following is an example of lossy compression?
A replacing each run of identical pixels with a count and one colour code
B reducing the sampling rate of a sound file
C replacing each repeated word in a text file with a reference to a dictionary of words
D storing the repeated property values in a vector file once and referring to them
[1]
- 1
Ask of each option: can the original be rebuilt exactly? A (run-length encoding), C (dictionary) and D all keep every piece of data, just stored more efficiently, so they are lossless.
- 2
Option B removes samples. The sound between the remaining samples is lost for good and the original cannot be recreated, so it is lossy. Answer B (1).
Answer
B
Examiner tip
Examiner tip: the test for lossless is always whether the exact original can be reconstructed from the compressed file. If data is thrown away, such as samples, colours or detail, it is lossy.
Common mistake: thinking any method that makes a file much smaller must be lossy. RLE can shrink a simple image a great deal and still be lossless.