Looking at the diagram on the web page, seems the key is the water. When expanding, use heat stored in the water to heat the gas. Likewise when compressing CO2 into liquid, use the water to store the excess heat generated?