2. Ministry of Higher Education Course: File organization- INF 221
Higher Technological Institute
Computer Science Department
Sheet 4: Secondary Storage Devices
1. What are the reasons of data compression?
Transmitting faster, decreasing access time.
Processing faster sequentially.
2. Describe in details the Huffman code and state an example?
Base on probability of occurrence
Determine probability of each value occurring
Build binary tree with search path for each value
More frequently occurring values are given shorter search paths in tree.
Example: the string “abde”
1 0100000 0001
3. What is meaning of Lempel--Ziv Codes?
Lempel-Ziv coding is a free-parse method; that is, the words of the source alphabet are
defined dynamically, as the encoding is performed. Lempel-Ziv coding is the basis for the
UNIX utility compress.
4. Describe in details lossy compression techniques?
Some information can be sacrificed
Less common in data files
Shrinking raster image
400-by-400 pixels to 100-by-100 pixels
1 pixel for every 16 pixels
Voice coding (the lost information is of no little or no value)
5. Represent 22 23 24 24 24 24 24 24 24 25 26 26 26 26 26 26 25 24 with run length
6. Encode the file containing the following characters, drawing the corresponding digital
tree “aaabbcbcdddeab” based on Lempel--Ziv Codes
7. Encode the file containing the following characters, drawing the corresponding digital
tree “aaababbbaaabaaaaaaabaabb” based on Lempel--Ziv Codes
8. Encode the file containing the following characters, drawing the corresponding digital
tree “I AM SAM. SAM I AM” based on Lempel--Ziv Codes