You are on page 1of 2

Misr University for Science and Technology

Information Technology College

Sheet Four

Question One. What is meant by data compression?


- Data compression is the art of representing information in a compact form, by identifying and
using structures that exist in the data, data can be anything (character, word, image).

Question Two. What is the advantage of data compression?


- Significant cost reduction
- Significant storage reduction
- Significant decrease with data transfers time
- Allowing the implementation of the application which otherwise couldn’t have been
implemented due to insufficient storage

Question Three. Data compression schemes can be divided into two broad classes, mention their
names and explain them?
- Lossless compression: as its name implies involve no loss of information if data have been
compressed with no loss of data, the original data can be recovered exactly from the
compressed data.
Necessary for: executable codes, word processing files and tabulated numbers.
- Lossy compression: lossy compression techniques involve some loss of information, and data
cannot be recovered or reconstructed exactly like the original.
Necessary for: video and speech cases.

Question Four. What are the techniques used for lossy compression?
- JPEG and MPEG.

Question Five. What are the techniques used for lossless compression?
- Run length encoding, Huffman, delta and LZW.

Question Six. Explain RLE compression.


- Run length encoding: data sequence having frequent runs of zeros. Each time a zero is
encountered in the input data, two values are written to the output file. The first of these
values is a zero, a flag to indicate what run-length compression is beginning the second value
is the number of zeros in the run.
Example:
Original data stream: 17 8 54 000 97 0 2
RLE: 17 8 54 03 97 01 2

Question Seven. Explain Huffman.


- It is found that more than 96% of data files consist of only 31 characters which are: the
lowercase letters, the space, the comma, the period and the carriage return. This observation
can be used to make an appropriate compression scheme for this file. A five-bit binary code is
assigned for each of these 31 common characters like, 00000 = ’a’, 00001=‘b’ , …… , this
allows 96% of the file to be reduced in size by 518 (5/8), the last of the five-bit codes is 11111
will be a flag indicating that the character being transmitted is not one of the 31 common
characters.
The next eight bits in the file indicate what the character is, according to the
standard ASCII assignment. This results in 4% of the characters in the input file
requiring 5+8=13 bits. The idea is to assign frequently used characters fewer
Misr University for Science and Technology
Information Technology College

bits, and seldom-used characters more bits. The average number of bits required
per original character is: 0.96 x 5 + 0.04 x 13 = 5.32. In other words, an overall
compression ratio of: 5.32/8 bits, or about 1:1.5 [2].
-

.....……………………………………………………………………………………………

You might also like