ZZIPlib Library

The Library

The zziplib library offers users the ability to easily extract data from files archived in a single zip file. This way, programs that use many "read-only" files from a program specific source directory can have a single zip archive

This library offers only a (free) subset of compression methods provided in a full implementation but that is well enough. The idea here is that zip/unzip utilities can be used to create archives that will later be read by using this library. Yet those programmes (or a library with their functionality) is not needed in that final operation.

Magic Wrappers

A ZZIP_FILE can serve as a replacement for a normal file descriptor. As long as it is only used for reading a file, the zzlib-user can actually replace the posix functions open/read/close by their counterparts from the zziplib library: zzip_open/zzip_read/zzip_close.

As long as the filename path given to zzip_open refers to a real file in the filesystem, it will almost directly forward the call to the respective posix open call. Any subsequent calls to zzip_read will then be forwarded to the posix read call on the memorized file descriptor.

The real benefit of the zziplib library comes about when the filename argument does actually refer to a file that is zipped in a zip-archive. It happens that even both a real file and a zipped file can live under the same pathname given to the zzip_open call, whereas the real file is used in preference.

When opening a file called 'test/README' it may refer to a real file (if one exists) or it can refer to a file 'README' that is compressed in an archive named test.zip. There are also wrappers for posix 'dirent.h'-like functions that can read a zip-archive as if it were a normal directory. See the examples programs that come with the library: zzcat.c and zzdir.c .

Download

At the moment, snapshots can be obtained in from a subdirectory of the PFE sourceforge project at pfe.sourceforge.net/pub. When you read this file, the project may already be announced at freshmeat and have its own project at sourceforge.net, probably zziplib.sourceforge.net.

Installation

There is currently only a source tar.gz file. The installation is simple, just type ''make install'' in the unpacked directory. This will actually perform the usual sequence of ''configure && make && make install''.

Documentation

Contact

The library was developed lately by Guido Draheim based on the library zip08x by Tomi Ollila who is supporting now the zziplib project. He has provided a good deal of testing rounds and very helpful comments. It is assumed that this library supersedes zip08x and that both our efforts will go into zziplib library. Anyone who want to contribute in accessing zip-archives with the zlib-library is hereby kindly invited to send us comments and sourcecode.


guidod@gmx.de 1. June 2000