added a gzip output if compression is enabled