Patent ID: 8294602

Claim:
A method for coding, performed by a process unit programmed in an encoder, comprising: obtaining the pulse distribution, on a track, of the pulses to be encoded on the track; determining a distribution identifier for identifying the pulse distribution, according to the pulse distribution; and generating a coding index that comprises the distribution identifier; wherein the pulse distribution comprises: a distribution of pulse positions on the track; or quantity of pulse positions, distribution of pulse positions on the track, and quantity of pulses in each pulse position; wherein, when the pulse distribution comprises a distribution of pulse positions on the track, wherein determining a distribution identifier for identifying the pulse distribution according to the pulse distribution comprises: comparing the pulse distribution with all possible distributions of the pulse positions on the track; and obtaining a distribution identifier corresponding to the pulse distribution, wherein each possible distribution of the pulse positions corresponds to a distribution identifier, when the pulse distribution comprises the quantity of pulse positions, the distribution of pulse positions on the track, and the quantity of pulses in each pulse position, wherein the distribution identifier comprises: a first index, adapted to identify all possible distributions of the pulse positions on the track when the quantity of pulse positions is determined; a second index, adapted to identify a distribution, corresponding to the distribution of current pulse position, of all the possible distributions corresponding to the first index; and a third index, adapted to identify the quantity of pulses in each pulse position.