Arithmetic coding and decoding! For specific data, assume that the source symbols are {00, 01, 10, 11}, and the probabilities of these symbols are {0.1, 0.4, 0.2, 0.3}, respectively. Based on these probabilities, the interval [0, 1) can be divided into 4 sub-intervals: [0, 0.1), [0.1, 0.5), [0.5, 0.7), [0.7, 1), where represents a half-open interval, that is, inclusive or not. The above information can be summarized in Table 1. Table 1 Source symbols, probabilities and initial coding intervals Symbol 00 01 10 11 Probability 0.1 0.4 0.2 0.3 Initial coding interval [0, 0.1) [0.1, 0.5) [0.5, 0.7) [0.7, 1) If the input of the binary message sequence is: 10 00 11 00 10 11 01. The first symbol input during encoding is 10, and its coding range is [0.5, 0.7). Since the coding range of the second symbol 00 in the message is [0, 0.1), its interval takes the first tenth of [0.5, 0.7) as the new interval [0.5, 0.52). By analogy, when encoding the third symbol 11, the new interval is [0.514, 0.52), when encoding the fourth symbol 00, the new interval is [0.514, 0.5146), etc. The encoded output of the message can be any number in the last interval.
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore