You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
For writing, it's currently mandatory to provide the ZIP_SOURCE_SEEK_WRITE and ZIP_SOURCE_TELL_WRITE commands in zip_source_callback.
Solution
Allow non-seekable output by making these commands optional. When the output is not seekable one can write a 'streamed' ZIP (by setting bit 3 of the general purpose bit flag) with the CRC-32, compressed size and uncompressed size filled with zero in the local header. The correct values are put in the data descriptor immediately after the compressed data.
This won't work for modifying existing zip archives (since I don't see a way to replace the original archive with the new one), but for creating new archives it would be a meaningful enhancement.
So we're not opposed to adding this functionality, but it's not high on our priority list. Patches are welcome ;).
Description
For writing, it's currently mandatory to provide the
ZIP_SOURCE_SEEK_WRITE
andZIP_SOURCE_TELL_WRITE
commands inzip_source_callback
.Solution
Allow non-seekable output by making these commands optional. When the output is not seekable one can write a 'streamed' ZIP (by setting bit 3 of the general purpose bit flag) with the CRC-32, compressed size and uncompressed size filled with zero in the local header. The correct values are put in the data descriptor immediately after the compressed data.
Additional context
libzip/lib/zip_close.c
Lines 380 to 381 in b3ac716
The text was updated successfully, but these errors were encountered: