Cooling by injecting a liquid in the gas to be compressed