Compression: Background
Compression: Background
Background
The main idea behind the
compression is to create such a
code, for which the average length of
the encoding vector (word) will not
exceed the entropy of the original
ensemble of messages.
This means that in general those
codes that are used for compression
are not uniform.
Shannon-Fano
Encoding
Sources without memory are such sources
of information, where the probability of
the next transmitted symbol (message)
does not depend on the probability of the
previous transmitted symbol (message).
Separable codes are those codes for which
the unique decipherability holds.
Shannon-Fano encoding constructs
reasonably efficient separable binary
codes for sources without memory.
Shannon-Fano
Encoding
Shannon-Fano encoding is the first
established and widely used encoding
method. This method and the
corresponding code were invented
simultaneously and independently of
each other by C. Shannon and R.
Fano in 1948.
Shannon-Fano
Encoding
Let us have the ensemble of the
original messages to be transmitted
with their corresponding
probabilities:
x1,x2,x3,x4,x5,x6,x7,x8
0 1
x1,x2 x3,x4,x5,x6,x7,x8
00 01 10 11
x1 x2 x3,x4 x5,x6,x7,x
8
100 101 110 111
x3 x4 x5,x6 x7,x8
Entropy 1 1 1 1 1 1
H 2 log 2 log 4 log 2.75
4 4 8 8 16 16
1 1 1
L P xi ni 2 2 2 3 4 4 2.75
4 8 16