There is a programming language that is reversible: Janus [1]. You could write a (lossless) data compression algorithm in this language, and if run in reverse this would uncompress. In theory you could do all types of computation, but the "output" (when run forward) would need to contain the old state. With reversible computing, there is no erased information. Landauer's principle links information theory with thermodynamics: putting order to things necessarily produces heat (ordering something locally requires "disorder" somewhere else). That is why Toffoli gates are so efficient: if the process is inherently reversible, less heat need to be produced. Arguably, heat is not "just" disorder: it is a way to preserve the information in the system. The universe is just one gigantic reversible computation. An so, if we all live in a simulation, maybe the simulation is written in Janus?
[1] https://en.wikipedia.org/wiki/Janus_(time-reversible_computi...
> The universe is just one gigantic reversible computation.
Assuming that the Many-Worlds interpretation is true.
Could you really do general compression in this language? I was under the impression that the output is always the same size or larger than the input.
That sounds interesting. I just checked out the examples in the Haskell Janus implementation: https://github.com/mbudde/jana