added support for gzip compression