Why compress?

Why compress?

Nowadays everyone has to transfer data using one or another way. Often this is done via Old school Floppy discs, USB Flash memories, CD/DVD, external devices, Internet , Ethernet, etc.
Then sometimes no matter what we choose, it appears that the capacity of the media is not enough and the information cannot be saved all. And if we do not have other channels to utilize, we need compression. Using compression the size of the data can be reduced, e.g. we can store more data.
Often we need compression in cases like:
– When we move data using Flash memory (USB dongle), CD/DVD, etc.
– When we are going to save data for a long period.
– When vast amount of data will be transferred over Internet, or when you use your mail to send attachments, FTP or other protocol to transfer files, and the limit emerge not enough.
– Against viruses. Compressed files hardly will be infected.
– For protection, using password and data encryption which is allowed by the most of the programs offering compression.
– To expose some free space on your local Hard Drive.

What exactly is to compress information?

Compressing data is a mathematician method, algorithm used to decrease the number of the bits in a file necessary for storing, sending or transferring electronic information. With other words using compression you diminish the size of the files or group of files storing information.
There are compression methods that loose data, but we will discus only compression without loss which can be used to store programs, data bases, documents and others. The "good" part is that the compressed data will be decompressed in the same form (recovering the data into its initial state), otherwise even bit less will be fatal.

Compression with no loss can be realized with different algorithms. Here are some:

– Algorithm RLE (Run Length Encoding) has target to decrease the size of the reiterated symbols. Usually RLE uses 2 bites per symbol one for the repetition and one for the symbol. It can be used for all kinds of data, but the size of the data will be different if you compress text or images.

Example: If we have the following raw of symbols AABBBBBDDDDDDDD, using RLE this will be converted to AA5B8D.

– Algorithm for removing all zeros.

Example: Let see this numbers 0 13 0 0 89 0 37 0 here on position 2,5 and 7 has zeros. Using bit mask we convert that to this binary number – 01001010 in decimal it will be 73, so the cipher will be 74 13 89 37. In this case the number of the bits from eight becomes to four which is 50% compression.

– Algorithm of Hoffman – also know as coding of Hoffman, that is another method for compress without loss. The basis here is that the most often symbols must be written with smallest number of bits. This algorithm creates a "tree" as a result of how frequently a symbol will be met.

There are many software applications developed for compressing and decompressing electronic data. The most popular are WinZIP and WinRAR, also UltimateZIP Compressor and Power Archiver. . Each application has different qualities as speed, compression level , supported formats, etc, but inside they are doing one and the same thing.

People’s choice is based on many things as price, interface, speed, so if you are starter with such programs, probably its better to use the trial or free versions of the products to understand which will fits your needs better.

Filed Under: Articles

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply