What is file compression,
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.
Lossless compression definition, file archiving
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
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.
Some graphic file fomats (notably, PNG files and deflated TIFF) uses
lossless compression, which usually results in less compression but no
image quality degradation after multiple cycles of modification and
saving of the picture, making this kind of image format suitable as
intermediate save files for image editing tools.
Lossy compression, instead,
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 compression
- 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.
|More information about file
External online resources: lossless
compression and lossy
definitions on Wikipedia.
Topics and serach suggestions: what is data compression, file
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.