When gases are compressed, their volume becomes smaller as seen in the Ideal gas law. This compression is used in gas engines, for example in the Diesel engine as in any internal combustion engine and in the steam engine. 