Ergodic theory and information