Difference between lossy and lossless compression

Publisher:SereneSpiritLatest update time:2024-09-04 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Lossy compression and lossless compression are both compression technologies, but no matter which technical model is used, the essence of the two is the same, that is, they both use a special encoding method to effectively reduce the repetition and redundancy in data information, thereby achieving the purpose of data compression. The basic principle is to retain only some "key points" in the original data without affecting the basic use of the file, and remove the repeated and redundant information in the data, thereby achieving the purpose of compression.

Definition of Lossy and Lossless Compression


Lossy compression takes advantage of the fact that humans are insensitive to certain frequency components in images or sound waves, allowing a certain amount of information to be lost during the compression process; although the original data cannot be fully restored, the impact of the lost part on understanding the original image is reduced, but in exchange for a much higher compression ratio, that is, the compressed data is used for reconstruction, and the reconstructed data is different from the original data, but it does not cause people to misunderstand the information expressed by the original data. Lossy compression is suitable for occasions where the reconstructed signal does not necessarily have to be exactly the same as the original signal. Image and sound compression (because the data contained in them is often more than our visual and auditory systems can receive, throwing away some data will not cause misunderstanding of the meaning of the sound or image, but can greatly improve the compression ratio). Lossy compression is widely used in the compression of voice, image and video data.


The lossless compression format uses the statistical redundancy of data for compression, which can completely restore the original data without causing any distortion. However, the compression rate is subject to the theoretical limit of the statistical redundancy of the data, which is generally 2:1 to 5:1. This type of method is widely used for the compression of text data, programs and image data in special applications (such as fingerprint images, medical images, etc.). It means using the compressed data for reconstruction (or restoration, decompression), and the reconstructed data is exactly the same as the original data; lossless compression is used in situations where the reconstructed signal is required to be completely consistent with the original signal.

Difference between lossy and lossless compression

1. Difference in reducibility

Lossless compression means that the file can be completely restored; after lossy compression, the file cannot be the same as the original file and there will be a certain amount of loss.

2. Difference in compression rate

The compression rate of lossless compression is theoretically limited by the statistical redundancy of the data, and is generally 2:1 to 5:1.

Lossy compression takes advantage of the fact that humans are insensitive to certain frequency components in images or sound waves, allowing a certain amount of information to be lost during the compression process. Although the original data cannot be completely restored, the impact of the lost part on understanding the original image is reduced, but in return a much larger compression ratio is achieved, up to 200:1 or even more.

3. Differences in compressed file formats

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

commonly used lossless compression formats include APE, FLAC, TAK, WavPack, TTA, etc.

4. Differences in compression principles

There are two basic mechanisms for lossy compression:

One is lossy transform coding, which first samples the image or sound, cuts it into small blocks, transforms it to a new space, quantizes it, and then entropy codes the quantized value.

The other is predictive coding, where previous data and subsequently decoded data are used to predict the current sound sample or image frame, and 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 run-length encoding, Huffman coding and arithmetic coding.

5. Differences in application areas

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

Due to the limitation of compression ratio, lossless compression is currently only used for the compression of text data, programs and image data in special application scenarios (such as fingerprint images, medical images, etc.). However, the prospects for lossless compression format are undoubtedly bright. As time goes by, various factors limiting lossless format will gradually be eliminated. For example, with the continuous increase in hard disk capacity, 1TB mechanical hard disks have become mainstream, and 200GB solid-state hard disks will also be popular. The problem of large space occupied by lossless format will no longer be a problem, and faster decoding chips will also be developed. It is believed that more and more hard disk players will support lossless format. In the near future, even the capacity of flash memory players will be calculated in TB. In order to pursue higher sound quality, lossless compression format will be increasingly valued.


Reference address:Difference between lossy and lossless compression

Previous article:What are the lossless compression algorithms?
Next article:Audio compression technology coding classification

Latest Embedded Articles
Change More Related Popular Components
Guess you like

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号