Compression And Decompression

Go down

Compression And Decompression

Post  admin on Tue 27 Jul 2010, 7:55 am

Compressing a file makes the file smaller, hence increasing storage efficiency because less storage space is needed to store the same data. The compression ratio measures the amount a file is compressed, describing how small the compressed file is compared to the uncompressed file. A higher compression ratio indicates greater compression of the data. However, compression can lead to loss of quality.

Multimedia systems use compression to reduce storage requirements and transfer speeds. Compression is reducing the size of a file using various techniques. Compression uses a ‘codec’ – which is an algorithm or a system of compression used on a file. ‘Codec’ stands for ‘Compression/Decompression’. A compression ratio is the ratio between the size of the original file and the size of the compressed file.

The two types of compression are:

* Lossy Compression - where data bytes are removed from the file. This results in a smaller file, but also lower quality. It makes use of data redundancies and human perception – for example, removing data that cannot be perceived by humans. So whilst quality might be affected, the substance of the file is still present. Lossy compression would be commonly used over the internet, where large files present a problem. An example of lossy compression is “mp3” compression, which removes wavelength extremes which are out of the hearing range of normal people. MP3 has a compression ratio of 11:1. Another example would be JPEG (Joint Photographics Expert Group), which is used to compress images. JPEG works by grouping pixels of an image which have similar colour or brightness, and changing them all to a uniform, “average” colour, and then replaces the similar pixels with codes.

* Lossless Compression - Lossless compression is compression where no data is lost and the quality of the original file remains. This works by using an algorithm that exploits data redundancies. These achieve lower compression ratio than lossy compression, but no data is lost and the quality stays the same. In a text file, for example, common words or other data might be replaced by preset symbols so that when the file is decompressed, it can be ‘expanded’ out, retaining the original data. Common uses would be computer programs where lossy compression could result in bugs and legal documents where no loss is allowed. A common lossless compression file format is .GIF. It achieves compression ratios of about 2:1. It is best used for drawing and line art, as it works by replacing patterns.


Posts : 70
Join date : 2010-06-22
Age : 25

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum