Data Storage and Compression
Data Representation · 4 question types
Exam Frequency Analysis
Past paper frequency (2018 to 2024)
This topic accounts for approximately 4% of your exam marks.
File size calculations and lossless vs lossy compression are regular 3 to 4 mark questions.
This comparison comes up regularly in exam questions worth 3 to 4 marks.
| Feature | Lossless | Lossy |
|---|---|---|
| Is any data lost? | No | Yes (permanently) |
| Can the original be reconstructed? | Yes, perfectly | No |
| Typical size reduction | Modest (1.5× to 4×) | Large (10× or more) |
| Effect on quality | None; quality identical to the original | Quality is reduced |
| Best for | Text documents, source code, archives, anywhere every bit matters | Photos, music, video, anywhere small size matters and minor quality loss is acceptable |
| Examples | PNG, FLAC, ZIP, GIF, RLE, PDF text | JPEG, MP3, MPEG/H.264, AAC |
Lossless vs lossy: explain the difference and justify a choice
What comes up: Explain why lossless (not lossy) compression is chosen for a given file type, or explain why lossy is unsuitable.
Write (two marks): (1) Lossless compression reduces the file size without permanently removing any data, so the original file can be reconstructed exactly. (2) Lossy compression permanently removes data — for a text document or source-code file this would corrupt or alter the content, making it unsuitable.
Watch out: Saying only "no data is lost" with lossless scores one mark but not the second. To score both, also explain what lossy would do to that specific file type (e.g. text would be damaged/corrupted).
Choosing which to use
- If the file is a text document or spreadsheet, choose lossless: a single missing word changes the meaning.
- If the file is source code or a database backup, choose lossless: a single missing bit can crash the program.
- If the file is a photograph for a website, choose lossy: a 10× smaller image that looks almost identical is a much better user experience.
- If the file is a music track to stream over a mobile network, choose lossy: most users cannot hear the difference between a 320 kbps MP3 and the studio master, and the smaller size saves bandwidth.