Diffusion of entrapped gas from porous media