0% found this document useful (0 votes)
4 views

Compression

The document discusses file handling and the importance of compression in reducing file sizes for images, audio, and video. It explains two types of compression: lossless, which retains original quality, and lossy, which removes unnecessary data. Additionally, it covers various file formats and codecs used for compression, including examples like PNG for lossless and MP3 for lossy compression.

Uploaded by

pdo43za
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Compression

The document discusses file handling and the importance of compression in reducing file sizes for images, audio, and video. It explains two types of compression: lossless, which retains original quality, and lossy, which removes unnecessary data. Additionally, it covers various file formats and codecs used for compression, including examples like PNG for lossless and MP3 for lossy compression.

Uploaded by

pdo43za
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Compres

sion
Presented
by:
Paul John
Niar
Introduction
File handling is one of the primary
functions of a computer system.
Based on the type of data that needs
to be stored, several types of file
formats are available. Each file
format occupies certain storage
space.
An image file with good quality occupies
around 1 MB, and an uncompressed 1-
minute audio file occupies around 11
MB. Compression methods are used to
reduce the size of the files.
Compression is also helpful in reducing
the download time of image, audio and
video from the internet.
Compressing
Image files
Image compression is the reduction in
file size to reduce download times and
storage requirements. Compressing
an image also changes its attributes
such as file type, resolution,
dimensions and bit depth.
2 types of
Compression:
• Lossless
compression
• Lossy
compression
Lossless
compression:
When the file is compressed,
the quality of the image
remains the same, and the
image can be reconstructed to
its original form. In this case,
information is very important
and cannot be lost.
Example of
Lossless
“See a pin and pick it up, all
the day you'll have good luck;
see a pin and let it lie, bad luck
you'll have all day” can be
coded in the form of numbers
in the table and stored in the
computer:
Table of Lossless
1 2 3 4 5 6 7 8 9 10 11 12 13
14 15 1 2 3 4 15 6 16 17 14 11
12 8 9 10
This saves memory by using
codes for words that are
repeated. This is a type of
lossless compression. With the
code and the index table, the
complete sentence can be
Lossy
When compression
a file is compressed, the
unnecessary bits of information are
removed permanently. This information is
less likely to be noticed by humans. This
type of compression is used for
photographs where the information to be
compressed cannot be predicted.
Examples of
Lossy:
• TIFF (.tif) and BMP (.bmp)
refers to raw bitmap, that
is, uncompressed image
files. As these file formats
are uncompressed, they
represent images with the
highest image quality.
types of compressed images
formats:
a) Lossless
PNG: PNG is a lossless compression
type that is mainly used for
transferring images over the internet.
Examples are:
GIF (Graphics interchange format) -
animated graphics used for small images
such as logos, icons, etc.
PDF (Portable document format) -
documents.
lossy
JPEG or JPG (Joint Photographic
Experts Group): JPEG is a lossy
compression type that offers a
high compression rate
compared to PNG. This method
is used in digital cameras.
streaming audio
files
• Compression is very helpful in
streaming and downloading audio and
video files. MP3 file format is used for
audio compression. This ensures up to
90% of compression. MP3 files are also
used for storing files in computers,
MP3 players, mobile phones, etc.
MP3
• A CD quality audio is converted to
MP3 file format using file compression
software. Even though the quality of a
MP3 file cannot match the original CD-
quality audio, it is still satisfactory for
various purposes. This is a lossy file
compression technique.
Waveform Audio File
Format
• A WAV file stores uncompressed
audio. It can be compressed to
an MP3 (Moving pictures experts
group audio layer 3)) file by
losing some data permanently.
The bit depth is also reduced to
remove data.
Codecs and Compression
Algorithms
Codecs are programs that encode or
decode an audio, image or video file.
Compression codecs are aimed at
reducing the size of a file without
affecting its quality. Algorithms decide
the amount of data that can be
removed to reduce the file size.
RLE
• Run-length encoding (RLE) is an
example of a compression algorithm
that converts the consecutive similar
values into a code. This code consists of
the identical value, and the number of
times this value is repeated. This is a
lossless type of compression.
Conclusions
The first row in the image
can be represented as 2 0
5 1 1 0. This code
represents 2 black pixels, 5
white pixels, and 1 black
pixel. Similarly, the second
row in the image is
represented as 1 1 6 0 1 1.
Thank You

You might also like