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

Compression

Compression reduces file size without significant loss of quality. There are two main types: lossless compression perfectly reconstructs the original file, using techniques like run-length encoding to reduce repetition. Lossy compression irreversibly removes unnecessary data, lowering quality but further reducing file size, as seen in formats like MP3 and JPEG that discard parts imperceptible to humans.

Uploaded by

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

Compression

Compression reduces file size without significant loss of quality. There are two main types: lossless compression perfectly reconstructs the original file, using techniques like run-length encoding to reduce repetition. Lossy compression irreversibly removes unnecessary data, lowering quality but further reducing file size, as seen in formats like MP3 and JPEG that discard parts imperceptible to humans.

Uploaded by

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

Compression

 Compression is the process of reducing file size without a significant loss in quality which
results in

o Reducing the time needed to search for data.

o Faster transfer of compressed files, which uses less bandwidth than uncompressed
files.

 Lossless Compression

o Type of compression that allows original data to perfectly reconstructed from


compressed file when the file is opened by utilizing some form of replacement.

o E.g. bitmap (.bmp), vector graphic (.svg) and .png images, text file compression,
database records

o Run-length Encoding (RLE)

 Form of lossless compression which is used for compressing text files and
bitmap images.

 Reduces file size of a sequence of elements which has adjacent, identical


elements (characters in text file and pixels in bitmap images).

 Repeating sequence of elements encoded in two values: run count and run
value.

o E.g. RLE of bitmap image:

 We can represent the first row as a sequence of pixels: “W B B W W B B W”

| W: white and B: black

 After applying RLE: “W 2B 2W 2B W”.

 In ‘2B’ 2 is the run count and B is the run value, which represents a run of
two adjacent black pixels

 Process is repeated for other rows.

 Lossy Compression

o Type of compression which irreversibly eliminates unnecessary data

o File accuracy/quality lower than that of lossless but file size is lower (~10% of
lossless).

o E.g. Sound files (.mp3), .jpeg images

o Sound files compression (.mp3) utilizes Perceptual Coding to remove certain parts of
sound that are less audible/discernible to human hearing.

You might also like