An audio/speech encoding apparatus comprising: a time to frequency domain transformation section (1401, 1505, 1603) that is adapted to transform a time domain input signal to a frequency spectrum; a vector quantization section (1403, 1506, 1604) that is adapted to perform quantization by splitting the the frequency spectrum of the input signal into sub-vectors and generating codebook indications for the sub-vectors, wherein the greater the codebook indication, the greater the codebook indication bit consumption; and a codebook indication transformation section (1404, 1507, 1605) that is adapted to transform the codebook indications, wherein: when total bits available is equal to or greater than total bits consumption for said quantization: a position of a sub-vector whose codebook indication consumes the most bits is identified; when the codebook indication consuming the most bits is greater than a threshold, the identified position, the codebook indications for all the sub-vectors except the codebook indication consuming the most bits, and a difference between bit consumption of the codebook indication consuming the most bits and its estimated bit consumption are encoded, and when the codebook indication consuming the most bits is not greater than the threshold, the codebook indications for all the sub-vectors except a sub-vector with a predetermined position and a difference between bit consumption of the codebook indication of the sub-vector with the predetermined position and its estimated bit consumption are encoded, wherein the estimated bit consumption is based on the total bits available and a sum of bit consumptions of the codebook indications of all the sub-vectors except the codebook indication consuming the most bits or the codebook indication of the sub-vector with the predetermined position; when the total bits available is less than the total bits consumption for said quantization: the codebook indications are encoded until there are no available bits left. a time to frequency domain transformation section (1401, 1505, 1603) that is adapted to transform a time domain input signal to a frequency spectrum; a vector quantization section (1403, 1506, 1604) that is adapted to perform quantization by splitting the the frequency spectrum of the input signal into sub-vectors and generating codebook indications for the sub-vectors, wherein the greater the codebook indication, the greater the codebook indication bit consumption; and a codebook indication transformation section (1404, 1507, 1605) that is adapted to transform the codebook indications, wherein: when total bits available is equal to or greater than total bits consumption for said quantization: a position of a sub-vector whose codebook indication consumes the most bits is identified; when the codebook indication consuming the most bits is greater than a threshold, the identified position, the codebook indications for all the sub-vectors except the codebook indication consuming the most bits, and a difference between bit consumption of the codebook indication consuming the most bits and its estimated bit consumption are encoded, and when the codebook indication consuming the most bits is not greater than the threshold, the codebook indications for all the sub-vectors except a sub-vector with a predetermined position and a difference between bit consumption of the codebook indication of the sub-vector with the predetermined position and its estimated bit consumption are encoded, wherein the estimated bit consumption is based on the total bits available and a sum of bit consumptions of the codebook indications of all the sub-vectors except the codebook indication consuming the most bits or the codebook indication of the sub-vector with the predetermined position; when the total bits available is less than the total bits consumption for said quantization: the codebook indications are encoded until there are no available bits left. when total bits available is equal to or greater than total bits consumption for said quantization: a position of a sub-vector whose codebook indication consumes the most bits is identified; when the codebook indication consuming the most bits is greater than a threshold, the identified position, the codebook indications for all the sub-vectors except the codebook indication consuming the most bits, and a difference between bit consumption of the codebook indication consuming the most bits and its estimated bit consumption are encoded, and when the codebook indication consuming the most bits is not greater than the threshold, the codebook indications for all the sub-vectors except a sub-vector with a predetermined position and a difference between bit consumption of the codebook indication of the sub-vector with the predetermined position and its estimated bit consumption are encoded, wherein the estimated bit consumption is based on the total bits available and a sum of bit consumptions of the codebook indications of all the sub-vectors except the codebook indication consuming the most bits or the codebook indication of the sub-vector with the predetermined position; when the total bits available is less than the total bits consumption for said quantization: the codebook indications are encoded until there are no available bits left.