implemented). Three main integer codes, called Elias, Fibonacci, and Golomb-Rice, will then be described. Together with the previous chapter, this description will complete our inventory of static codes, namely codes that apply to cases where the source symbols are known, and the matter is to assign the optimal code type. In the most general case, the source sym- bols and their distribution are unknown, or the distribution may change according to the amount of symbols being collected. Then, we must find new algorithms to assign optimal codes without such knowledge; this is referred to as dynamic coding. The three main algorithms for dynamic coding to be considered here are referred to as arithmetic coding, adaptive Huffman coding, and Lempel-Ziv coding. Integer coding The principle of integer coding is to assign an optimal (and predefined) codeword to a list of n known symbols, which we may call {1, 2, 3, n}. In such a list, the symbols are ranked in order of decreasing frequency or probability, or mathematically speaking, in order of "nonincreasing" frequency or probability. This ranking assumes that at least the ranks of the most likely symbols are known beforehand; the remaining less-likely symbols being arranged in the list in any order. In this case, neither Shannon-Fano coding nor Huffman coding can be implemented, and we must then be looking for new types of "heuristic" code, which will exhibit minimal redundancy (the difference between the obtained mean codeword length and the source entropy). Such is the rationale for integer coding. The most frequently used algorithms are given by the Elias, Fibonacci, and Golomb-Rice codes, which I shall describe next. Elias codes come in two different types, which are named Elias-gamma and Elias- delta. The correspondence between the first 32 integers, their uncompressed binary representation, and the Elias-gamma or delta codewords is shown in Table 10.1. An explanation of the codeword assignment follows. Integer, arithmetic, and adaptive coding Table 10.1 Various typ