close zlib stream