摘要 |
A data encoding method for successive input data values comprises: comparing an input data value with an ordered set of n-1 (plural) different threshold values, n being three or more, generating range data defining that one of the n complementary ranges bounded by the threshold values in which the current data value lies; selecting one or more of n complementary portions of a set of code values according to the range data corresponding to that input data value, the portion sizes relative to the set of code values defined by at least n-1 context variables (CV) associated with that input data value; modifying the size of the set of code values, for use in respect of a next input data word, depending upon the current sizes of the set of code values and of the selected portion; detecting whether the set of code values is less than a predetermined minimum size; and, if so, successively increasing the size of the code values set to at least the predetermined minimum size; and outputting an encoded data bit in response to each size-increasing operation. An analogous decoding method, comparing a test value with the n complementary portions, is also claimed. |