Kuan-ming Lin GS 321A homework (commented by Janet Maceda) Feb. 9, 2005. All Rights Reserved. Data Compression Data compression is defined as the process of encoding an input into a compact sequence which reserves sufficient information. It can be categorized into two classes: lossless and lossy. Lossless data compression guarantees that the original message can be exactly reconstructed from the compressed sequence. The popular ZIP file format is a typical example in this class. Other popular lossless compression schemes include RAR, gzip, bzip (all used for compressing files), and PNG (used for compressing images). In contrast, lossy compression does not necessarily reserve all information; therefore, the decompressed file is an approximated yet nearly indistinguishable duplication. Many multimedia compression standards, e. g. JPEG for images and MPEG for video/sound, employ the lossy compression scheme, not only because it yields shorter compressed stream, but also because the small loss of quality is usually not perceivable.