Process of reducing the amount of data needed for storage or transmission of a given piece of information (text, graphics, video, sound, etc.), typically by use of encoding techniques.
Data compression is characterized as either lossy or lossless depending on whether some data is discarded or not, respectively. Lossless compression scans the data for repetitive sequences or regions and replaces them with a single "token." For example, every occurrence of the word the or region with the colour red might be converted to $ . ZIP and GIF are the most common lossless formats for text and graphics, respectively. Lossy compression is frequently used for photographs, video, and sound files where the loss of some detail is generally unnoticeable. JPEG and MPEG (see MP3 ) are the most common lossy formats.