portable zip support

Lubomir I. Ivanov neolit123 at gmail.com
Thu Jul 31 03:34:37 PDT 2014


this has been discussed before,

(note: does not affect the 4.2 release)

libzip is a good library but it has it's flaws - it doesn't work well
on windows, because windows doesn't support utf-8 filenames; i just
checked things like zip-open.c from their HEAD and it seems that
_wopen() is still not used; _wmkdir() is probably missing as well.
another flaw is that it cannot operate on memory buffers, which means
you can only use a file interface.

there was a GSOC project about using minizip.

i had some time to rest yesterday, so i wrote these commits that
implement the minizip idea:
https://github.com/neolit123/subsurface/commits/zip

the interface is partial (only the "extract-from-zip" logic) and is
currently not used by subsurface.
the "add-to-zip" is more complicated, since minizip doesn't support
*everything* in terms of memory operations, but i know how to
structure the zip file-format chunks directly with something like
extra 80 LOC.

overall this minizip implementation will require a more low-level
maintenance, but will give better control. also, i will need some more
free time to finish it.

comments on show-stoppers and everything else are appreciated.

lubomir
--


More information about the subsurface mailing list