The difference between lossy compression and lossless compression

Both lossy compression and lossless compression are compression technologies, but regardless of the technical model used, the essential content of both is the same, that is, the repetition degree, which exists in the data information through a special encoding method, Redundancy is effectively reduced to achieve the purpose of data compression. The basic principle is that without affecting the basic use of the file, only some "key points" in the original data are retained, and the redundant and redundant information in the data is removed to achieve the purpose of compression.

Definition of lossy and lossless compression
The difference between lossy compression and lossless compression

Lossy compression is the use of human insensitivity to certain frequency components in images or sound waves, allowing certain information to be lost during compression; although the original data cannot be fully recovered, the impact of the lost part on understanding the original image is reduced , But in exchange for a much larger compression ratio, which refers to the use of compressed data for reconstruction, the reconstructed data is different from the original data, but does not affect people to misunderstand the information expressed in the original data. Lossy compression is suitable for situations where the reconstructed signal does not have to be exactly the same as the original signal. Image and sound compression (because it contains more data than our visual system and listening party system can receive, throwing away some data without misunderstanding the meaning expressed by sound or image but can greatly increase the compression ratio ). Lossy compression is widely used to compress voice, image and video data.

The lossless compression format is to use the statistical redundancy of data for compression, which can completely restore the original data without causing any distortion, but the compression rate is theoretically limited by the statistical redundancy of data, generally 2: 1 to 5: 1. This type of method is widely used for the compression of text data, programs and image data for special applications (such as fingerprint images, medical images, etc.). That is to use the compressed data for reconstruction (or called restoration, decompression), the reconstructed data is exactly the same as the original data; lossless compression is used when the reconstructed signal is required to be completely the same as the original signal.

The difference between lossy compression and lossless compression
The difference between lossy compression and lossless compression

1. The difference in reduction

Lossless compression can be completely restored; after lossy compression, it cannot be the same as the original file, and there is a certain loss.

2. The difference in compression ratio

Lossless compression The compression rate is limited by the theoretical statistical redundancy of data, which is generally 2: 1 to 5: 1;

   Lossy compression takes advantage of the insensitivity of humans to certain frequency components in images or sound waves, allowing some information to be lost during compression. Although the original data cannot be completely recovered, the impact of the lost part on understanding the original image is reduced. But in exchange for a much larger compression ratio up to 200: 1 or more.

3. The difference in compressed file format

mp3, divX, Xvid, jpeg, rm, rmvb, wma, wmv and other formats are lossy compression;

   Lossless compression formats commonly used are APE, FLAC, TAK, WavPack, TTA, etc.

4. The difference in compression principle

Two basic mechanisms of lossy compression:

One is lossy transform coding and decoding. First, the image or sound is sampled, cut into small blocks, transformed into a new space, quantized, and then the quantized value is entropy encoded.

The other is predictive coding and decoding. The previous data and the subsequent decoded data are used to predict the current sound sample or image frame. The error between the predicted data and the actual data and some other information to reproduce the prediction are quantized and encoded.

The principles of lossless compression include stroke coding, Huffman coding, and arithmetic coding.

5. Differences in application fields

Lossy compression is widely used in the compression of voice, image and video data;

Lossless compression is limited by the compression ratio and is only used for the compression of text data, programs and image data (such as fingerprint images, medical images, etc.) for special applications, but the prospect of lossless compression format is undoubtedly bright, as time goes by The various factors that limit the lossless format will be gradually eliminated, such as the continuous increase of hard disk capacity, the mechanical hard disk 1TB has become the mainstream, and the solid-state hard disk 200GB will also be popularized. The decoder chip will also be developed. I believe that more and more hard disk players will support the lossless format. In the near future, even if the capacity of the flash memory player must be calculated in TB, in order to pursue higher sound quality, Lossless compression format will be more and more valued.

Ningbo Autrends International Trade Co.,Ltd. , https://www.supermosvape.com