zipping/unzipping library?



Before I embark on this I'd like to find out if something of the sort already exists, or if someone else is already working in this area. Also, perhaps, how much interest there might be in this project.

What I'm thinking would be useful is a library, with the portability level of glib, offering the functionality of creating and extracting files from zip archives. I envisage it using both glib and zlib, and offering a basic API with these elements:

* A function to create a zip file, given a target filename, a list of files to archive, and a compression level.

* A function to retrieve a list of file attributes from a zip archive.

* A function to extract all, or a selected list of, files from a zip archive.

This functionality is already present in the Infozip packages, zip and unzip. But although these packages contain some gestures toward offering a library API, this has not been taken very far. And although the infozip programs work very nicely, the code is not pretty (for one thing, it's choked with #ifdefs for every ancient architecture known to man).

The zlib API itself is fine; but it's quite low level, and it leaves the application programmer to do much of the grunt work involved in creating or reading a multi-file zipfile.

One further comment: I can imagine the question, why bother with the zipfile format when gzipped tar is better? My response is that for better or worse the PKzip format has become a de facto standard, now enshrined in the ODF specs, and I'd like for my app to be able to read and write ODF files.

--
Allin Cottrell
Department of Economics
Wake Forest University, NC



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]