zlib sample code.