To encode multi-channel digital data by adjusting the number of bits
allocated to each channel to perform entropy coding of the multi-channel
data, there is provided a multi-channel encoder including n encoders for
audio data from n channels and an inter-channel bit allocator that
allocates the number of bits usable for each channel on the basis of the
provisional number of in-use bits from each of the encoders. Each of the
encoders performs entropy coding on the basis of the provisional number
of quantizing steps, outputs the provisional number of in-use bits
resulting from summing of a code length of each unit of coding, and
adjusts the number of in-use bits by updating the quantizing steps
correspondingly to the number of bits supplied based on the provisional
number of in-use bits. Also, the inter-channel bit allocator allocates
the total number of usable bits as the number of bits determined
correspondingly to a ratio of each provisional number of in-use bits with
the sum of all the proportional numbers of in-use bits.