Patent ID: 7499596

Claim:
A method of operating an encoding apparatus, the apparatus configured to encode an ordered series of digital signals that each have a respective value, including a respective amplitude from a finite set of amplitudes consisting of the most likely-to-occur amplitude and at least one other amplitude, the at least one other amplitude including a next most likely-to-occur amplitude to the most likely-to-occur amplitude, the method comprising: for a first contiguous region in the series: identifying runs that each includes one or more consecutive signals each having any amplitude other than the most likely-to-occur amplitude; and for each of at least some of the identified runs encoding the relative position and runlength of the identified run, and of any intervening consecutive signal having the most likely-to-occur amplitude; identifying amplitude events of at least one consecutive signal within the identified run, an identified amplitude event being (a) a sequence of at least one consecutive signal having the next most likely-to-occur amplitude that ends in a signal having other than the next most likely-to-occur amplitude, (b) only a signal having other than the next most likely-to-occur amplitude not preceded by a signal having the next most likely-to-occur amplitude, or (c) only a sequence of consecutive signals having the next most likely-to-occur amplitude not followed by a signal having other than the next most likely-to-occur amplitude, each identified amplitude event within the identified run defined by the length of the sequence of at least one consecutive signal having the next most likely-to-occur amplitude, and by the amplitude of the ending signal; and encoding each identified amplitude event by at least one codeword such that for at least some identified amplitude events, relatively more likely-to-occur amplitude events are encoded by shorter respective codewords than relatively less likely-to-occur amplitude events, such that relatively short codewords are formed to represent signal values or sequences of signal values that are relatively more likely-to-occur, and relatively long codewords are formed to represent signal values or sequences of signal values that are relatively less likely-to-occur.