Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
8 views

File Compression

Uploaded by

z5mh2h8qyc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

File Compression

Uploaded by

z5mh2h8qyc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

File compression

Why is there a need to compress files?


• To either save storage space
• or to reduce the time taken to stream or transmit data from one device to another

There are two forms of file compression:

1. Lossy file compression


The lossy file compression algorithm eliminates unnecessary data .

This type of compression usually results in some loss of detail when compared to the
original; it is usually impossible to reconstruct the original file. The algorithms used in the
lossy technique have to decide which parts of the file are important (and need to be kept)
and which parts can be discarded.

MPEG-3 (MP3) and MPEG-4 (MP4)


• MPEG-3 (MP3) uses technology
• known as audio compression to convert music and other sounds into an
MP3 file format.
• That reduces the music file size by about 90%. For example, an 80 MB
music file on a CD can be reduced to 8 MB using MP3 technology.
• MP3 files are :
• used in MP3 players, computers or mobile phones.
• can be downloaded or streamed from the internet in a compressed
format, or CD files can be converted to MP3 format.

Note: While streamed or MP3 music quality can never match the ‘full’ version found on a CD, the
quality is satisfactory for most purposes.

But how can the original music file be reduced by 90% while still retaining most of the music
quality?
By using file compression algorithms that use perceptual music shaping. Perceptual music
shaping removes certain sounds. For example
» frequencies that are outside the human hearing range
» if two sounds are played at the same time, only the louder one can be heard by the ear, so
the softer sound is eliminated.

• This means that certain parts of the music can be removed without affecting
the quality too much.
• Since MP3 files use a lossy format, (part of the original file is lost following
compression) the original file cannot be put back together again.
• However, the quality of MP3 files can be different, depending on the bit rate
– the number of bits per second used when creating the file. Bit rates are
between 80 and 320 kilobits per second; usually 200 kilobits or higher gives a
sound quality close to a normal CD.
• MPEG-4 (MP4) files :
• Allow the storage of multimedia files rather than just sound; Music, videos,
photos and animation
• Videos, for example, could be streamed over the internet using the MP4
format without losing any real discernible quality.

Photographic (bit-map) images


• When a photographic file is compressed, both the file size and quality of image are
reduced.
• A common file format for images is JPEG
• Once the image is subjected to the JPEG compression algorithm, a new file
is formed and the original file can no longer be constructed.
• A JPEG will reduce the raw bit-map image by a factor of between 5 and 15,
depending on the quality of the original.

Note: Vector graphics can also undergo some form of file compression. Scalable vector
graphics (.svg) are defined in XML text files which, therefore, allows them to be compressed.

2. Lossless file compression


This is particularly important for files(non-graphic) where loss of any data would
be disastrous (such as a spreadsheet file of important results).

With this technique, all the data from the original file can be reconstructed when the file is
uncompressed again. Lossless file compression is designed to lose none of the original
detail from the file (such as Run-Length Encoding (RLE).

You might also like