Operation mechanism of file compression tool
We often hear about file compression. For those who often download files from the web, it will be very familiar with ZIP or RAR formats. And those who edit media files know that compression is an effective way to share photos, music and videos on the web without using up all the bandwidth. Therefore, it can be affirmed that file compression is the core of web activities, you can object that larger files can still be shared on the web, right, but it takes too much time, right is not?
So how does the mechanism of file compression work?
Compressing files is not a miracle, but it is also the result of research and hard work of many talents for years. There are two main types of file compression: no loss of quality or lossless compression and loss of compression or loss of compression (lossy).
In this article, we will try to simplify everything so that you can understand the compression mechanism, if you want to learn more about file compression algorithms you should find them on Wikipedia and the linked sites. arrive there.
Compression does not reduce quality
Basically, lossless compression works by removing redundancy. To make it easy to imagine, look at this stack of bricks:
As you can see, we have 2 red bricks, 5 yellow bricks and 3 green tiles. The simplest way to display these bricks is the same as above, the "show" runs out. But that's not the only way to do it. You can turn them into like this:
In the image above, you can see exactly the information - two red bricks, five yellow and three blue - but it takes up less space. In this way you have replaced the same, excess bricks by using numbers, so that 3 bricks can represent 10 bricks.
This example has helped you get a glimpse of lossless compression. Excess information is replaced by instructions that tell the computer how much of the same data is repeated. Another example:
fffffffuuuuuuuuuuuu
Can be compressed as follows:
f7u12
That is just a method of lossless compression. Several other algorithms have been used, but the thing to remember about lossless compression is that the file space is only temporarily reduced and it is possible to recreate the original file from the compressed file. In the example above, with three numbered bricks, you know exactly how many bricks are created by how many. No information is lost here, like its name.
Programs like WinZip all use compression that doesn't compromise quality. They remove this excess information when you compress (or "zip") the file and restore it when you extract (or "unzip"). Nothing is lost.
For images, PNG files also use this compression method. That is why images are smaller in size but do not reduce size, redundant information is represented using instructions.
Of course, this is just a way to simplify the problem but still retain the basic principle of the lossless compression mechanism. If you want to learn more, read on Wiki and use the English version to get the right description of the expert.
Compression reduces quality
In contrast to compression that does not reduce quality is compression that reduces quality. This compression mechanism eliminates redundant, redundant information. There are quite a few files on your computer that use this compression mechanism.
Take an MP3 as an example. Like everyone else you save thousands of MP3 files in your computer. But did you know that they don't contain all the audio information like when they were recorded? Some sounds (humans may or may not hear) have been removed during compression. The more you compress a file, the larger the removed information. That's why when the file is compressed too much, the sound will be worse.
Lossy compression is widely used in multimedia files such as photos, music, videos, because not always these files need to store enough original information. But if using lossy compression for text files will be problematic, because the file after compression has a lot of garbled information.
Another example of compression reduces quality, which is a JPEG image format. In general, web-based images do not need to be as high-quality as those used for printing. Therefore, you can drop a lot of backup information for web images, even when printing them looks very bad.
Of course, compressing and re-compressing a file with lossy compression reduces quality because each time it does, more data is lost. Here is a photo, I have compressed it three times, resulting in this:
You can see how the quality drops from the left to the right. This may not be important, depending on the intended use of the image, and that is why lossy compression exists.
Remember, lossy compression actually loses data, so you won't be able to recover the original file from the compressed file. Think carefully before using. Many printing projects have been canceled because of a lack of understanding of this issue.
The important thing to remember is that the compressed files using the lossy compression method actually lose data, which means you cannot recreate the original file from the compressed file. Consider compression method to not miss your job.
This is just a simplified way for you to understand the problem faster, but if still not satisfied, please read more here: https://en.wikipedia.org/wiki/Lossy_compression it's really attractive and interesting. .
Conclude
Compressing files is a part of the daily workings of computer users and the Internet, compressing the time to download a website, files faster and easy to share files with friends.
Hope this article helps you understand the part about file compression mechanism.
See more:
- Collection of the best file compression and decompression software available today
- How to reduce PDF file size by software
- How to compress video capacity by Format Factory
You should read it
- Which file compression format is best?
- Top 3 best file compression and decompression software 2020
- Top software to extract files and compress files today
- Zip bomb can compress 4.5 million GB of data into a 46MB file
- Instructions to fix the corrupted zip file with Winrar
- How to Advanced Compress Files with 7zip
- How to compress data on Cloudpresso
- Test evaluation of 2 WinRar and 7Zip compression tools
- What is file 7Z? How to open this file?
- How to turn off file compression in Windows 10
- How to fix the compressed archive using WinRar?
- The best RAR file extraction application on Android
Maybe you are interested
Top 10 best file compression and decompression software
Top file compression and decompression software 2023 on PC, Laptop
Competing the 3 best file compression software on Windows today
Top best file compression and decompression software today
12 best file compression tools on Linux
How to automatically delete files after compression on WinRAR - No need to delete manually