File Compression:

When data is transmitted over the internet it will go through many different physical links between routers (watch warriors of the web). The connection from a computer or a LAN into the internet is likely to be the slowest part of this route, as you probably know from experience. At home you may have quite a slow network connection and it may take a while for webpages to load.

One way of speeding up the rate at which files can be transmitted across the internet is to compress them to make them smaller. Smaller files take less time to transmit over a network.

Understanding how compression affects files is important as the type of compression selected will affect how the image or audio arrives. The final use of the file will dictate how much you can compress it and still have a file that is suitable.

Both lossy and lossless file compression can be used with sound files although the former is far more effective in reducing file sizes.

Lossless compression:

Allows the original file to be re-created exactly from the compressed file. It works by searching for patterns in the file so, instead of repeatedly storing a block of identical data, the data is stored once and then indexed. Further occurrences are simply stored as the index number so the decompression software can simply look up the data and place it back in the correct position.

Type File Suffix Compression Type Explanation
Bitmap .bmp - Uncompressed still image file
JPEG JPG Lossy Good for photographs, Colour depth = 24 bits, RGB, 16.7 million different colours
Windows Media Player .wmv .wav Lossy Audio files: Files are not as small as MP3
MP3 .mp3 Lossy Audio files: designed for downloading music from the internet. In MP3 format your could fit 120 songs on a CD.
MPEG - 1 .mpg Lossy Video files: Suitable for small low-resolution sequences on CD.
MPEG - 2 .mp2 Lossy Video files: Suitable for full-screen, high resolution video on DVD.

Lossy compression:

Files that include a lot of unique information, such as bitmap graphics, audio or video files, cannot be compressed much with lossless compression because there is so little repeated data. Lossy compression removes data that is not needed, either because a drop in quality is acceptable or the difference cannot be detected by the human eye or ear. With lossy compression you do not get the original data back when it has been decompressed. This sort of compression would therefore NOT be suitable for anything that needed to be reproduced exactly such as software, databases or text.

Type File Suffix Compression Type Explanation
Portable Network Graphic .png Lossless Colour depth = 24 bits, RGB, 16.7 million different colours.
Graphic Interchange Format .gif Lossless Colour depth = 8 bits (only 256 colours) Good for images with large areas of solid colour ideal for web graphics. Although this is a lossless compression, images with high colour depths are often converted into GIFs to make them smaller (This process is called 'Quantisation' but is not in the GCSE specification)
Quick Time .mov Lossless Audio files
Portable Document Format .pdf Lossless A usually uncompressed document format that is widely accessible.