Compression

Robusta Study

Revision videos, vocabulary practice and written questions for IGCSE.

Compression

Why files are compressed, lossy against lossless, and run-length encoding step by step.

Transcript

Compression makes a file smaller. That saves storage space, and the file downloads and streams faster, using less bandwidth.

Lossy compression permanently removes some data. The file gets much smaller, but the quality is lower, and the original cannot be rebuilt.

An image can lose resolution or colour depth. Sound can lose sample rate or bit depth. J P E G and M P three are lossy.

Lossless compression makes the file smaller without losing any data, so the original can be rebuilt exactly. P N G and ZIP are lossless.

One lossless method is run length encoding, or R L E. It replaces a run of the same value with the value, and a count.

Take a row of twelve pixels: five white, then three black, then four white. R L E stores just three pairs: five W, three B, four W.

Twelve values become three pairs, so the file is smaller, and nothing is lost. R L E works best when there are long runs of the same value.

Compression saves space. Lossy throws data away, lossless keeps everything, and R L E is a simple lossless method.

More in this series