Open the app
  1. Home
  2. Lessons
  3. GCSE & IGCSE Computer Science
  4. Data compression

Data compression

🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.

Compression makes files smaller so they take less space and travel faster across networks. The trick is choosing what, if anything, to throw away.

Why compress?

Smaller files use less storage, download and upload faster, and use less bandwidth.
Streaming video and music would be very hard without compression.

Lossless compression

The file is made smaller without losing any data. The original can be rebuilt exactly.
Essential for text, program files and spreadsheets, where every bit matters. Examples: ZIP, PNG.

Lossy compression

Some data is permanently removed, usually detail people will hardly notice.
Files become much smaller, but the original cannot be restored.
Used for photos, music and video. Examples: JPEG and MP3.
Worked example

A school wants to email a 60-page report and a holiday photo. Which type of compression suits each?

  1. Report: every character matters, so lossless.
  2. Photo: small loss of detail is fine, so lossy gives a much smaller file.

Answer: Lossless for the report, lossy for the photo

Key idea

Compression saves storage and transmission time. Lossless keeps all the data and can be reversed exactly. Lossy permanently removes some data to make much smaller files (JPEG, MP3).

Check you have got it

Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.