|go text: || - index - problems - systems - libraries - converting - programming - [ old library ] - new library - links -
||topics: || - dualmode renames - the extra function - largefile64_source - glibc headers - [ libgz example *** ] -

LibGZ Example Project

The LibGZ is derived from the ZZipLib library - in the latter ZIP-files can be handled like a filesystem complete with directories and (transparently compressed) files. The LibGZ library will only provide for a GZ_FILE handle that allows to transparently read gzipped files as if they were not compressed at all.

This example gives you an overview how to create a library that is similar to the stdio libary while providing the same dualmode binary library. So there is really some "filelength64" / "filelength" pair of functions in the binary distribution while the example program "gzlib.c" only references "filelength". Looking into the resulting binary "gzlib.exe" shows that it does call to "filelength64" - in other words, it was pushed into the largefile64 mode.

You can download the source tarball in the ZZipLib download area named like libgz-0.1.0.tar.gz. Using "rpm -ta" you can easily turn this into a proper Linux RPM archive. The sources have been prepared for the WIN32 case (any comments welcome on this part). You can have a look at the sources directly in the SCM at
===> http://zziplib.svn.sourceforge.net/viewvc/zziplib/trunk/libgz-0/.

===> Copy it, Modify it, Use it in your own code!


Additional notes