Menu

Compression is the process of reducing the size of a file by reducing the amount of data it contains. A compressed song, poster or game level still plays, opens or works, but it takes up less room.

Why compress a file?

Every file you store or send costs space and time, and compression cuts both:

  • Storage — a phone, memory card or school network drive holds far more files when each one is smaller, so you run out of room less often.
  • Transfer — a smaller file uploads, downloads and streams more quickly, because there is less data to push across the connection.
  • Web pages and online media — a photo-heavy page opens sooner on a weak mobile signal, a video streams with less buffering, and a podcast episode downloads faster before a journey.

What it can cost

The two main types are lossy compression and lossless compression. Lossy compression discards some of the original data, so the file can lose quality — though often you would not notice unless it is squeezed very hard. Lossless compression throws nothing away, so the original quality is kept. Which one suits a file depends on whether its exact contents must survive.

A worked example: a 300 MB project file takes 60 seconds to upload over a connection that carries 5 MB every second. Compressed to 60 MB, the same upload takes 12 seconds. The time saved by sending less data is often worth more than the space saved on the drive.

Practise this