Compression, Knowledge Organiser

Knowledge Organiser: Compression

Key Terms

  • Compression: Reducing file size by encoding data more efficiently
  • Lossless compression: File size reduced with no data permanently lost — exact original recoverable
  • Lossy compression: File size reduced by permanently removing data — original cannot be recovered
  • RLE (Run-Length Encoding): Lossless algorithm that replaces repeated values with a count and value
  • Compression ratio: How much smaller the compressed file is compared to the original

Must-Know Facts

  • Lossless: 30–70% file size reduction; reversible; exact original restored
  • Lossy: 80–95% file size reduction; irreversible; some data permanently lost
  • Lossless formats: PNG, ZIP, FLAC, GIF
  • Lossy formats: JPEG, MP3, MP4, AAC
  • Use lossless for: text, programs, medical images, legal documents
  • Use lossy for: photos, music, video (human perception is the limit)
  • RLE example: AAAAAABBB → 6A3B (count then value)
  • RLE can make files larger if there are no long runs of repeated data

Key Concepts

  • RLE method: Scan for runs of identical values; store as (count, value) pairs
  • Why lossy works for media: Removes data humans cannot perceive (inaudible frequencies, invisible detail)
  • Lossy is irreversible: Once data is removed it cannot be recovered — never compress originals with lossy
  • Trade-off: More compression = smaller file but lower quality; less compression = better quality but larger file

Common Mistakes

  • Mixing up lossy and lossless: Lossy permanently removes data (used for audio/video/images where quality loss is acceptable); lossless keeps all data and is reversible (used for text, software, ZIP files)
  • Saying lossless compression is always better: Lossless achieves less size reduction — lossy compression is preferred when file size matters more than perfect quality (e.g. streaming music)
  • Thinking RLE always reduces file size: Run-length encoding only helps when there are long runs of repeated values — images with many different colours (e.g. photographs) can actually get larger with RLE
  • Saying compressed files take longer to transmit: Compression reduces file size, which reduces transmission time — this is one of the main reasons compression is used

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.