On asymptotically optimal source coding and simulation of stationary sources