A statistical multiplexer selectively passes packets of encoded data from a plurality of encoders to a communication channel so as to maximize the quality of the encoded data. The statistical multiplexer determines what fraction of the communication channel capacity should be allocated to an application so as to optimize the quality of the decoded signals of the applications processed by the statistical multiplexer. A table is stored in a memory of the statistical multiplexer that has an entry for each unit of encoded data that can be transmitted over the communication channel in a predetermined time interval. The statistical multiplexer accesses each entry in the table to obtain a pointer, e.g., an address, to an encoder that can transmit the next unit of encoded data to the communication channel. The statistical multiplexer dynamically adjusts the data compression rate for each variable rate application so that the quality of all the encoded data streams are optimized over a window, and builds a new table that reflects the adjusted rates. In one application, the table is broken into a static table and a dynamic table. The static table is built at configuration time and while one dynamic table is being used for a window, a new dynamic table is built for the next window.