The work done is the shaded area

This situation provides an example of the conservation of energy with the inclusion of heat.

The work that is done on the air is stored as heat and elastic potential energy.