Abstract: Improved efficiency in allocating bits to individual ones of a plurality of sub-band signals (or amplitude coefficients) is realized by employing a so-called template matching technique. A plurality of the most likely to occur bit allocation patterns and a corresponding plurality of templates including representations of a prescribed characteristic of the sub-band signals that would generate a corresponding one of the bit allocation patterns are stored for later use. Selection of a bit allocation pattern for use in encoding and/or decoding the sub-band signals is effected by matching in accordance with a given one of the stored templates to representations of the prescribed characteristic of the sub-band signals presently being encoded. In one example, the prescribed characteristic is a power estimate and the matching criterion is a minimum rate distortion criterion.