0984

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.

stable
Rare
Stable4%

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.

FeatureLosslessLossy
Is any data lost?NoYes (permanently)
Can the original be reconstructed?Yes, perfectlyNo
Typical size reductionModest (1.5× to 4×)Large (10× or more)
Effect on qualityNone; quality identical to the originalQuality is reduced
Best forText documents, source code, archives, anywhere every bit mattersPhotos, music, video, anywhere small size matters and minor quality loss is acceptable
ExamplesPNG, FLAC, ZIP, GIF, RLE, PDF textJPEG, MP3, MPEG/H.264, AAC
Exam tip

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.