Cryptography Reference
In-Depth Information
3) Divide the segment of this symbol again into M new segments with length
proportional to the symbols probabilities.
4) From these new segments, choose the one corresponding to the next symbol
in the message.
5) Repeat Steps 3) and 4) until the whole message is coded.
6) Represent the segments value by a binary fraction.
Following the above steps, Fig. 2.5 has shown a source of five symbols, their
probabilities and the arithmetic coding process of the message CCODE. The
decoding process is just the reversing of the above steps. In this example, any
value that is between 0.03248 and 0.03280 will be decoded as CCODE.
Symbol
Symbol
Probability
Probability
Interval
Interval
C
C
0.2
0.2
[0, 0.2)
[0, 0.2)
D
D
0.4
0.4
[0.2, 0.6)
[0.2, 0.6)
A
A
0.1
0.1
[0.6, 0.7)
[0.6, 0.7)
O
O
0.2
0.2
[0.7, 0.9)
[0.7, 0.9)
E
E
0.1
0.1
[0.9, 1)
[0.9, 1)
0.0
0.0
0.0
0.00
0.00
0.000
0.000
0.0280
0.0280
0.02960
0.02960
C
C
C
C
0.2
0.2
0.2
0.04
0.04
0.008
0.008
0.0296
0.0296
0.03024
0.03024
D
D
D
D
0.6
0.6
0.6
0.12
0.12
0.024
0.024
0.0328
0.0328
0.03152
0.03152
A
A
0.7
0.7
0.7
0.14
0.14
0.028
0.028
0.0336
0.0336
0.03184
0.03184
O
O
O
O
0.9
0.9
0.9
0.18
0.18
0.036
0.036
0.0352
0.0352
0.03248
0.03248
E
E
E
E
1.0
1.0
1.0
0.20
0.20
0.040
0.040
0.0360
0.0360
0.03280
0.03280
Fig. 2.5. Example of arithmetic decoding.
2.2.4 Discrete Cosine Transform
Transform coding is reversible and linear transform that maps the pixels of
image into a set of transform coe cients. For natural images, the energy will
be compacted at the low frequency part in the transform domain, and the high
frequency coe cients will have very small magnitudes. On the other hand,
Search WWH ::




Custom Search