Abstract
We present one-shot compression protocols that optimally encode ensembles of identically prepared mixed states into qubits. In contrast to the case of pure-state ensembles, we find that the number of encoding qubits drops down discontinuously as soon as a nonzero error is tolerated and the spectrum of the states is known with sufficient precision. For qubit ensembles, this feature leads to a 25% saving of memory space. Our compression protocols can be implemented efficiently on a quantum computer.