Hi,

For various compression formats there is a C library for compressing
and decompressing:
  - libbz2
  - liblz4
  - liblzma
  - libzstd

But there is no 'libgz'. It appears that in order to decompress a stream
of gzipped data:
  1) one needs the 'libz' library from zlib.net,
  2) there are two APIs [1]:
     - gzopen() and gzread() for input from a file descriptor,
     - inflateInit2 (..., 16 + MAX_WBITS) and inflate() for input from a
       region of memory.

It's unclear to me whether it can alternatively be achieved with
libzip from libzip.org.

How about documenting this in the GNU gzip manual? I find it strange
to have to either read the source code of libarchive or some other
package, or ask some LLM about it. gzipped data streams frequently
occur as part of HTTP responses and surely also in many other areas.

The GNU gzip manual references the two RFCs, that define the data
format. But these references don't have the answer either.

Bruno

[1] https://zlib.net/manual.html

     





Reply via email to