Show understanding of the principles of data compression (lossless and lossy compression algorithms) applied to music/video, photos and text files
When data other than text is being transmitted, e.g. on the Internet, it is important to limit the amount of data that needs to be sent to stop the time taken to download the data being unreasonably long. The amount of data can be limited by reducing the file size of pictures so that they take up only a small part of the screen or restricting them to a few colours. Speeding up the transmission of the data is achieved by reducing the amount of data that is sent. This is known as file compression.
Compression can be either lossy or lossless. Lossless compression means that no data is lost.
LOSSY COMPRESSION
Lossy compression involved sacrificing some of the data in order to reduce the file size. Lossy compression techniques reduce the quantity of data in two ways. First by using complex mathematical encoding and secondly by deliberately losing some types of visual information that our eyes and brain usually ignore (this is called quantization).
For example, the video frame rate may be reduced from the normal 25 frames per second down to around 15 frames per second before there is a perceptible loss in quality. The frames themselves may be treated as separate still images, and compressed individually using JPEG compression. Different areas of a frame may be compressed by different degrees – an area of blue sky which lacks detail might be compressed by 25:1, whereas a person’s face might only be compressed by 5:1. Depending on the amount of action in the video, only some areas of each frame may change from one frame to the next and only the changed data need be stored. The size of the picture may also be reduced, reducing the overall quantity of pixels to be stored.
If lossy compression is taken to an extreme, it can result in a significant loss of picture quality. The higher the compression ratio, the worse the resulting image. For instance, colour fidelity fades and the edges of objects become very obvious, until eventually the results is unwatchable.
JPEG image compression works in part by rounding off nonessential bits of information. There is a corresponding trade-off between preserving information and reducing size. A number of popular compression formats exploit these perceptual differences, including those used in music files, images, and video. Lossy image compression can be used in digital cameras, to increase storage capacities with minimal degradation of picture quality. Similarly, DVDs use the lossy MPEG-2 Video codec for video compression.
LOSSLESS COMPRESSION
Lossless compression uses mathematical techniques such as Huffman coding or Discrete Cosine Transformation (DCT), to reduce the quantity of information to be stored, while still being capable of reproducing the original image without any loss in quality.
Lossless data compression algorithms usually exploit statistical redundancy to represent data more concisely without losing information, so that the process is reversible. Lossless compression is possible because most real-world data has statistical redundancy. For example, an image may have areas of colour that do not change over several pixels; instead of coding "red pixel, red pixel, ..." the data may be encoded as "279 red pixels". This is a basic example of run-length encoding; there are many schemes to reduce file size by eliminating redundancy.
Compression standards include MPEG, M-JPEG, Cinepak,