Sat. Jan 21st, 2023

Types of compression

Compression is the process that is used to reduce the amount of space information takes to store.

It can work in one of two ways:

  • Lossy (information considered unimportant is discarded)
  • Lossless (the de-compressed file is identical to the original)

Lossy

Never used for scientific data, numerical data, text or applications.

Examples of lossy compression include:

JPEG – an image format that removes ‘subtle’ details to simplify the data, and therefore represent it in a smaller space

MPEG (H.264 etc) – video compression which uses JPEG for key frames, and then stores only the differences between successive frames, based on the expectation that usually there is little change from one frame to the next

MP3 and AAC – audio compression which discards sounds that would not be heard by the majority of people because they are masked by louder sounds.

Lossless

Used where the decompressed file should be identical to the original – for example when archiving, or where changes or loss to the data is unacceptable. For example, when storing data, text or applications.

ZIP/RAR – compression formats which allow multiple files to be compressed into a single file, which when decompressed will restore identical copies of the original data.