
Zlib Compressed Data Software Is Provided
It can be used in very similar fashion as the zlib above:/* zlib.h - interface of the 'zlib' general purpose compression library version 1.2.8, April 28th, 2013 Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. Next format and library you can use is bz2. From the print statements we can see that the sizes of both compressed and decompressed data match. To demonstrate that we are able to recover the data, we then again open the compressed file and use decompress function on it.



Zlib Compressed Data Zip Streams In
This library can optionally read and write gzip streams in memory as well. Gzip is a gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. The gzip format is different from the zlib format. The library also supports reading and writing files in gzip (.gz) format with an interface similar to that of stdio using the functions that start with "gz". The compressed data format used by default by the in-memory functions is the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped around a deflate stream, which is itself documented in RFC 1951.
The decoder checks the consistency of the compressed data, so the library should never crash even in case of corrupted input. The library does not install any signal handler. The gzip format was designed for single- file compression on file systems, has a larger header than zlib to maintain directory information, and uses a different, slower check method than zlib.
See RFC 1952 for more details on the meanings of these fields.
