9618 · 1.3
Compression flashcards
Revision flashcards for Cambridge 9618 Compression (syllabus 1.3). Flip, recall, then mark a real past-paper question.
Card
What is compression?
The process of reducing the size of a data file by using an algorithm to encode the information using fewer bits than the original representation.
Card
What is lossless compression?
A type of compression where the original data can be perfectly reconstructed from the compressed data. No information is lost. Examples: ZIP, PNG, FLAC.
Card
What is lossy compression?
A type of compression where some data is permanently discarded to achieve a much smaller file size. The original data cannot be perfectly reconstructed. Examples: JPEG, MP3, MPEG.
Card
What is Run-Length Encoding (RLE)?
A simple lossless compression algorithm that stores sequences of repeating data as a single data value and a count. For example, WWWWBB becomes 4W2B.
Card
When is RLE most effective?
When the data contains long runs of identical values, such as in simple bitmap images with large areas of solid colour, icons, or simple graphics.
Card
When is RLE ineffective or even counter-productive?
When the data has few or no repeating sequences, like in complex photographs or random text. For data like 'ABCDE', RLE might produce '1A1B1C1D1E', which is larger than the original.
Card
What is a common trade-off in lossy compression?
The trade-off between file size and quality. Higher compression results in a smaller file but also lower quality (more data is discarded).
Card
Is the PNG file format lossless or lossy?
Lossless. This is a common point of confusion as it's an image format like JPEG, but PNG is designed for perfect reconstruction, making it ideal for graphics and logos where sharp lines are important.
Card
How do you calculate the compression ratio?
Compression Ratio = Uncompressed file size / Compressed file size. A ratio of 5:1 means the compressed file is 5 times smaller than the original.
Card
Why can't you 'uncompress' a lossy file back to its original state?
Because the compression process permanently deletes data that the algorithm deemed 'unnecessary' or 'imperceptible'. This information is gone forever and cannot be recreated.
Card
What is dictionary-based compression?
A lossless technique (like LZW used in GIF/TIFF) that builds a dictionary of recurring data patterns and replaces them with shorter codes. For example, 'the ' could be replaced by a single byte code.