We consider procedures for converting input sequences of symbols generated by a stationary random process into sequences of independent, equiprobable output symbols, measuring the efficiency of such a procedure when the input sequence is finite by the expected value of the ratio of output symbols to input symbols. For a large class of processes and a large class of procedures we give an obvious information-theoretic upper bound to efficiency. We also construct procedures which attain this bound in the limit of long input sequences without making use of the process parameters, for two classes of processes. In the independent case we generalize a 1951 result of von Neumann and 1970 results of Hoeffding and Simons for independent but biased binary input, gaining a factor of 3 or 4 in efficiency. In the finite-state case we generalize a 1968 result of Samuelson for two-state binary Markov input, gaining a larger factor in efficiency.