IT-Universitetet /Kurser E2004 /Introduktion til multimediesystemer

Coding and Compression

Theoretical Exercise

Problem 1:

Explain lossless coding

Problem 2:

Explain perceptual coding

Problem 3:

Explain linear predictive coding

Problem 4:

How would the following sequence be run-length encoded and what percentage smaller is the run-length encoded data?

sequence: 111112223333312222221111111333333333

Problem 5:

Suppose all odd symbols in the previous problem are replaced by 1, and all even symbols are replaced by 0. Is there a further compressed coding which can be defined and what percentage smaller is this scheme relative to the original binary sequence?

Problem 6:

Calculate the coding efficiency of the following code:

Symbols a,b,c,d,e
P(a) = .5
P(b) = .4
P(c) = .05
P(d) = .03
P(e) = .02
code for a = 00
code for b = 01
code for c = 11
code for d = 100
code for e = 101

Problem 7:

Calculate the coding efficiency of the following code:

Symbols a,b,c,d,e
P(a) = .3
P(b) = .2
P(c) = .2
P(d) = .2
P(e) = .1
code for a = 00
code for b = 01
code for c = 11
code for d = 100
code for e = 101

 

Problem 8:

Calculate the coding efficiency of the following code:
Symbols a,b,c,d,e all have probabilities .2

code for a = 00
code for b = 01
code for c = 11
code for d = 100
code for e = 101


 


Practical Exercise in Lossless Compression

 

Exercise 1 :

Create your own compression/decompression program in java. The program should be based on either Lempel-Ziv-Welch (LZW) coding or Huffman coding.

Encode and decode the BW-image and the LaTeX-file with your RLE program. The decoded files should be a exact copy of the original. Use the CompareFiles.java program to check it.

A well-known example of a program performing lossless compression is WinZip. Compare the compression ratio using WinZip with that of your program.

Calculate the entropy of the two files. Comment the results.

 
 
 

 


Updated 2004-09-23

til top