Compression

GCSE Computer Science · Data Representation

Why compress?

Smaller files use less storage and transfer faster over a network (less bandwidth).

Lossless compression

  • No data is lost — the original is restored exactly.
  • Works by storing patterns efficiently:
  • Run-Length Encoding (RLE) stores "5 white pixels" instead of listing each.
  • Dictionary coding replaces repeated data with shorter codes.
  • Used for text, code, spreadsheets (ZIP, PNG, FLAC).

Lossy compression

  • Permanently removes data the eye/ear barely notices.
  • Much smaller files, but quality is reduced and cannot be recovered.
  • Used for photos (JPEG), music (MP3), video (MP4).

Comparison

LosslessLossy
QualityPerfectReduced
File sizeLargerSmaller
Reversible?YesNo
UseText, codePhotos, music, video

Exam tip

If a question mentions text or program files, the answer is lossless — losing data there would corrupt the file.

Don't understand a part?

Sign in and ask our AI tutor to explain any passage in plain English.

Try AI explanations →

More on Data Representation

Binary and Denary Hexadecimal Binary Arithmetic and Shifts Characters, Images and Sound

← All GCSE Computer Science notes