Thermodynamics · Energy balances for closed systems
A compressor, an engine cylinder and an air spring all move a piston; the path the pressure takes decides how much work that costs.