Compression algorithms
Prepress files are often huge so it is no more than logical that data are compressed. There are quite a few compression algorithms that can be used for both text and images. A basic knowledge about how the different algorithms work can be worthwhile.
These pages give an overview of the various compression algorithms that are used in the prepress industry. It is by no means a complete overview of all available algorithms. The following types of compression are documented in more detail:
I have not yet documented:
- CCITT group 3 & 4
- JBIG
Types of compression algorithms
The above algorithms can be divided into two distinct categories: they are either lossless or lossy.
- Lossless algorithms do not change the content of a file. If you compress a file and then decompress it, it has not changed. The following algorithms are lossless:
- CCITT group 3 & 4 compression
- Flate/deflate compression
- Huffman compression
- LZW compression
- RLE compression
- Lossy algorithms achieve better compression ratio’s by selectively getting rid of some of the information in the file. Such algorithms can be used for images or sound files but not for text or program data. The following algorithms are lossy:
- JPEG compression
Which algorithm is best?
Unfortunately there is no fixed answer to that question. It all depends on the type of file that has to be compressed as well as the actual content of the file and the question whether you are willing to accept a lossy algorithm for that particular file. As a general rule, here is what most people in prepress use or find appropriate:
- text: often not worth compressing, sometimes RLE is used
- line-art images : LZW
- line-art and screened data: CCITT group 4
- grayscale images: LZW for files that do not contain too much detail
- color images : JPEG if lossy compression is acceptable
- vector drawings: not supported by applications
about compression algorithms and techniques
Dear sir,
We are devolping a DMS Package ( Document Management System ) , and we very interested on the following:
1- Documents Compression
2- Documents Encryption
Best Regards
Ali Malkawi
Hi Ali,
Is DMS package complete?? Please let me know the details. I am intersted in it.
Regards
Furqan Naqvi
Is it possible to compress a text using huffman compression technique ? please let me know asap.
Yes, that algorithm is very suitable for compressing text.
I’m developing a software to compress various types of files like audio,video,images etc.
i want to know which would be the best algorithm.
i want to compress the files to the unreadable format and decompress them to readable format as required.
There is no universal compression algorithm that can be used for all the data types you list. Audio compression is different from video compression which is different from image compression. This site focusses on print – and as such contains advice about various algorithms for images. Even for these there is no single algorithm that works best for all types of images. Depending on the type of image (black & white, grayscale, RGB, CMYK) a different algorithm is better. There is no easy answer because you do not provide much information. If, for instance, it is unacceptable for your customers to lose details in images, JPEG compression is out of the question.
Is this algo is suitable for compressing audio,video and images too?