|
When compressing data, a heuristic approach may be the right choice. If a smaller size is more important than quality, it is okay to lose some data. Losing data during compression is known as lossy compression. Most of the time this loss of data cannot be detected by the human eye or ear. If a red color was changed slightly, the human eye would not be able to see the difference. So, when an image is compressed, the computer may look at colors that are very similar and change them all to the same color. When there are millions of colors, this could save a lot of file size and make the file load faster on websites and send faster through email. For an audio file, this might mean that the sample rate or bits per second is reduced. The audio file could be reduced from 96 kHz to 44.1 kHz without noticing a big enough difference to justify the much larger file size.
— Computer Science Principles
(book)
by Kevin Hare
(see stats)
|