Compression is the reduction in the size of data in an image so that space and transmission time is saved. Compression can be performed on the data content or the entire transmission unit for data transmission. Programs which use formula are used for compression. This is because these formula determine how to compress or decompress the data. Image file formats are designed to compress as much information as possible. There are 2 types of compression; Lossy and lossless.
Lossy
Lossy compression is a compression technique which results in an image losing some of its quality whenever it is compressed so that the file size becomes smaller. Lossy compression is mainly used to compress audio, video and images for internet use. An example of a type of lossy file format would be JPEG. While lossless compression gives a better quality image, lossy compression has the advantage of creating smaller files.
Lossless
Lossless compression is a compression technique which results in an image keeping its quality whenever it is compressed. It has an advantage over lossy compression in terms of quality as lossy compression will result in the image losing quality. However, while lossless compression gives the user a higher quality image than lossy compression, its quality means that the file size will be larger and it will take longer to load if it is used on a website. Example of applications were lossless compression is used are the ZIP file format and the Unix tool gzip.
Advantages of Compression
There are a number of advantages of compression a file. When the file is compressed, its file size becomes smaller. This will result in less disk space being used so the user will have more space to add other files. As the file size is smaller, it will not take as long to transfer the file from one place to another. Other advantages of compressing a file are that the byte order will be independent and the read/write head on the hard drive will be able to locate the files faster.
Disadvantages of Compression
While there are many advantages of compressing a file, there are also a number of disadvantages. When compressing a file there may be a chance that an error could occur during the transmission. If this were to other the user may lose important information which is stored on the file. Compressing small files can result in the user being able to access those files quicker. However, if a large or more advanced type of file is compressed, the user may find that it will take longer to access this file. Other disadvantages of compressing files are that the byte/pixel relationship is unknown and all previous data needs to be compressed.
No comments:
Post a Comment