A method is provided for rate matching a number of input bits in a time
interval to a fixed number of output bits in the time interval, whereby
the input bits consist of a set of at least two different bit classes,
each of the classes having a certain number of bits in the time interval,
whereby the rate matching is performed in two rate matching stages,
whereby the first rate matching stage operates only on a selection out of
the set of different bit classes, thus establishing a proportion between
the number of bits of the different classes, and the second rate matching
stage operates on all bit classes such that the proportion is exactly or
approximately maintained after the second rate matching stage and the
fixed number of output bits consisting of bits of the different bit
classes is achieved.