Simplify code checking for gzip a little bit.