摘要 |
The invention relates to a method of defining a new set of codewords for use in a variable length coding algorithm, and to a data encoding method using such a code. Said coding method comprises at least the steps of applying to said data a transform and coding the obtained coefficients by means of the variable length coding algorithm. The code used in said algorithm is built with the same length distribution as the binary Huffman code distribution, and is constructed by implementation of specific steps : (a) creating a synchronization tree structure of the codes with decreasing depths for each elementary branch of said tree, with initialized parameters D = l>max<, K = N>lmax</2, AND CURRENTl = l>cur< =l>max<, (D and K being integers representing respectively the maximum length of a string of zeros and the maximum length of a string of ones, l>max< the greatest codeword length, and n>lmax< the number of codewords of length l>max< in the Huffman code); (b) for each length l>cur< BEGINNING FROMl>max<, IF N'>lcur< <>N>lcur<, USING THE CODEWORD 1>k< as prefix and anchor to it the maximal size elementary branch of depth D' = l>cur< - K; (C) IF 1>k< cannot be used as prefix, find a suitable prefix by choosing the minimal length codeword that is in excess with respect to the desired distribution. |