moved and deduplicated gzipDecompress()