added check for zlib
added preliminary gzip stream