Menu

Compression

Lossless compression

Lossless compression makes a file smaller without throwing away any of the original data. Every detail that was in the file is still there afterwards, so the quality stays exactly as it was.

When every detail has to stay

Lossless compression is used when the contents of a file must stay exactly the same and any loss of data would be unacceptable. Imagine a vet takes an X-ray of a dog's leg and stores it in the practice's records. The image must stay exactly as it was so a tiny hairline fracture is still visible when another vet checks it weeks later. Compressing the X-ray losslessly means it takes up less storage space and is quicker to send, yet none of the original image data has been lost.

Smaller savings, nothing lost

Lossless compression usually gives a smaller reduction in file size than lossy compression. The file does get smaller, just not by as much, because no data has been removed to free up space.

For example, a 40 MB X-ray might shrink to about 16 MB with lossless compression. Lossy compression could take the same X-ray down to 3 MB, but only by removing some of the detail, and a fine hairline fracture could end up blurred. So lossless is the right choice whenever keeping every piece of the original data matters more than making the file as small as possible.

Practise this