How Is Compression Prediction?

When does lossless compression reduce to prediction, and what must already be fixed before that equivalence applies?