Compression is a clever method of reducing redundant data and hence reducing overall file size. Complex algorithms which mainly focus on the data structure optimization and redundancy elimination make file compression possible. Such algorithms include Adaptive Huffman codes, LZW algorithm etc. To compress file, several file compression software are available. These software implement such compression algorithms and eliminate the need for manual compression. File archivers are another set of software to compress file. These archivers not only compress the individual files but pack multiple files into one single entity as well. They are extremely useful for Internet applications and e-mail uploads. The compressed file can hence be expanded with these software with the original data preserved.
Compression can be primarily split into two types: Lossy and Lossless Compression. In lossy compression technique, data is lost during the course of compression. This is the reason this type of compression is used in fields where a little loss of quality is acceptable. Audio, Image, Video etc are such fields. Jbig2 is type of lossy compression algorithm which is used to compress image files. Lossless Compression on the other hand does not result in any loss of data. Text compression must be done with Lossless compression, as data loss in such cases is unacceptable. Huffman compression technique is one type of Lossless Compression to compress file of text type. But on the whole, the original idea of reducing redundancy still stays intact. Software to compress file only look for patterns. A careful selection of patterns is added to a local dictionary, based on the repetitions of the words. This in turn is substituted in the main file and hence results in a reduced size. A reduction of around 50% can be achieved using this technique.
Compression is extremely useful in many cases and scenarios. It mainly helps reduce the need of expensive resources such as bandwidth and hard disk space. Dis-advantages include extra processing of the data hence consuming time. But fortunately popular algorithms to compress file take only a minimal amount of time. Every program to compress file works differently and is mostly environment specific.