Compression
Choosing between lossy and lossless compression comes down to one question: is losing some of the data acceptable? If it is, lossy compression can shrink the file far more. If every bit of the original must survive, you need lossless.
| Feature | Lossy compression | Lossless compression |
|---|---|---|
| File size | Much smaller | Smaller, but not as small |
| Quality | Reduced permanently | Kept exactly the same |
| Original restorable? | No — the removed data is gone for good | Yes — decompressing rebuilds the exact original |
| Suitable files | Images, sound, video | Any file, including text |
Text files, documents, spreadsheets and program files must always use lossless compression. A program is a set of exact instructions, so removing even a few characters changes what it does and it stops running. Losing characters from a report leaves it unreadable. These files cannot tolerate data loss at all.
Images and sound can use either type. Lossy is fine when a small drop in quality will not be noticed: a club logo shown only a few centimetres across in a school app loses detail the eye never sees. Lossless is needed when the picture or recording is the finished product and no detail can be given up.
Video nearly always uses lossy compression because raw video is enormous. Lossless video exists but is used only in professional editing, where the footage will be worked on again and again.
Justify a choice using four things: how much the file size must drop, how much quality is required, whether the original must be restored later, and the type of file. A pupil recording a 20-minute interview with a care home resident for a history project could choose lossy, because the clip must be small enough to upload over slow school Wi-Fi and only the words need to be heard. As the master copy, though, it would be stored losslessly: the pupil will cut out pauses and slot in clips from other interviews, and saving a lossy file again throws away more data and drops the quality further.
OCR GCSE Computer Science · Compression