added codes for gzip and zlib