gdraheim / zziplib

The ZZIPlib provides read access on ZIP-archives and unpacked data. It features an additional simplified API following the standard Posix API for file access
Other
60 stars 50 forks source link

Add support for working for nested Zip #146

Open yairlenga opened 1 year ago

yairlenga commented 1 year ago

Hi,

The Zip utility has two useful features: archiving (packing multiple files into a single ZIP File), and compression (making files smaller). I'm using the archiving option to pack multiple Zip files into a single "master" zip. In my example, the individual zips represent monthly snapshot of the data. Hoping that it will be possible to extend the zzlib (and the supporting utilities) to support direct extraction from nested zips (which are NOT compressed - just STORED). Functionality available with libzip (using the zip_source object, see https://libzip.org/documentation/zip_source.html).

Ideally, the function to open a zip file will accept location of nested (e.g.: "/path/to/file.zip!nested/path/real.zip"). Given zzlib ability to virtualize IO, seems like simple task - hope that someone already have a way to do it.

If the '!' notation (borrowed from Java "jar" URL style), does not fit, explicit function will also work, but then command line syntax is less elegant, and does not extend to "double-nesting".

Looking for feedback - if this idea is reasonable - and assuming that there is valid implementation - will be accepted into the project.