libzio
A Library for Accessing Compressed Text Files
The libzio provides using fopencookie(3) of the glibc or funopen(3BSD) together with zlib and libbzip2 an API to read or write gzip/bzip2 files with streams. Libzio uses the GNUC weak facility to allow programs to be linked against zlib or libbzip2 only.