check if data is compressible before doing a gzip on it

We should probably not gzip already compressed data, for example images.