   Wrapper for reading or writing gzip/bzip2 files
   ===============================================

This small lib provides with the help of the fopencookie(3)
of the glibc and the libz and libbz2 a simple interface for
reading or writing gzip/bzip2 files.

To use this e.g. an

  #include <zio.h>

and

  FILE * file = fzopen("myfile.gz", "r");

together with linking the resulting program with -lzio
_and_ -lz.  For bzip2 files clearly the libbz2 with -lbz2
has to used at linking time.

The libz and/or libbz2 librares iare required because the
libzio is not linked with -lz nor with -lbz2.  If the
appropiate library functions of libz or libbz2 are not
found the fzopen(3) function returns NULL and the errno
is set to ENOSYS.

As the libbz2 does not provide a function for seeking
within a bzip2 file, any call of fseek(3) on the open
stream will fail and set the errno to ESPIPE.

For writing gzip/bzip2 files, fzopen(3) only supports
the suffixes ``.z'' and ``.gz'' for gzipped files and
``.bz2'' for bzip2ed files.

On reading first the appropiate suffixes are checked
if not provided. If no file is found the magic byte
sequence at the beginning of the file is checked to detect
a gzip or bzip2 file.

Happy (un)compressing,

     Werner Fink
