File compression is the process of
creating a smaller output from a larger input, in order to sparing
storage space, or saving bandwidth to share the data, or reduce the
input to a suitable size for a media of distribution (CD, DVD, mail
attachment size limit...).
Data compression can be defined lossy or lossless, in terms of
reversibility of the compression process due loss (or preservation) of
original information in the process.
statistical models to map the input to a smaller
output eliminating redundancy in the data.
In this way the output carry
exactly all the information featured by the input in less bytes, and
can be expanded when needed to a 1:1 copy of the original data, which
is a fundamental property for storing some types of data - i.e. a
software, a database.
For this reason lossless compression algorithms are used for archive file formats
used in general
purpose archive manager utilities, like 7Z, RAR,
and ZIP, where an
exact and reversible image
of the original data must be saved.
Lossy compression, instead, works identifying unnecessary
or less relevant information (not just redundant data) and removing it.
In this way data
compression is improved but at the cost of making lossy compression a
non reversible process - as it comes at the cost of losing part of the
Lossy compression is consequently not suitable for general purpose file
(as in example losing a single byte of an executable file would make it
not working), but it works very well when loss of less relevant
information is acceptable, as for multimedia files - in example for MP3
losing audio information below the audibility threshold, or losing not
visible details in JPEG images, or both in compressed video formats.
So, information loss is destructive for the ability of 1:1 reversal of
the algorithm (the information is permanently lost), but it is not
prejudicial for the ability of end users to receive meaningful
information - intelligible audio, clear picture or video.
Most common lossy compression algorithms are consequently usually fine
tuned for the specific pattern of a multimedia data type.
Due the lossy nature of those compression schemes, however, usually
professional editing work is performed on non compressed data (i.e. WAV
audio, or TIFF images) or data compressed in a lossless way (i.e. FLAC
audio, or PNG images) every time it is feasible so saving the work in
progress multiple times does not result in losing bits of the
information each time, with progressive degradation of quality -
reserving use of lossy compression to final step for creating a
reasonably sized output to distribute for media consumption.
Topics: what is data compression, file compression
definition, lossless compression, lossy compression, algorithms, ZIP,
RAR, 7Z, MP3, FLAC, WAV, JPEG, PNG, TIFF, file archive, lossy vs
lossless comparison, how to compress files.
Related articles: Share
compression hints, Solid
extracting files SFX, Convert
archive type, What is a ZIP file?,
7Z archives, CAB package, Extract RAR file, TAR
files, Zip/Unzip files, Open ZIPX files
> Tips and tricks > What is lossles
compression, and lossy compression