]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Refactor Zip writer.
authorTim Kientzle <kientzle@acm.org>
Sun, 1 Dec 2013 22:45:56 +0000 (14:45 -0800)
committerTim Kientzle <kientzle@acm.org>
Sun, 1 Dec 2013 22:45:56 +0000 (14:45 -0800)
commitfc6df8f01d99f00f69ca8e521d881998e702683a
tree5acee25bf2fa811458dfaff531204fe5a4de0dab
parent9856f6b49a6adec72934d8704283785a09164b61
Refactor Zip writer.

Zip writer no longer preserves full archive_entry objects for
every entry; it just accumulates the actual bytes to be put
into the central directory.  Most of the central directory file
header is formatted at the same time as the local file header.
The header formatting is refactored to make it easier to support
variable-length extra data.

The tests are adjusted to match the new output:  We include more
detailed extra data in the central directory, we're more selective
about generating data descriptors (they're not needed for directory
entries, for instance), UT extra data now includes only the time
fields specified by the user, we're setting the "version required"
field more accurately.

There are some initial attempts to include Zip64 extensions
when appropriate; that still needs lots of work.  I'm not
yet sure how to test Zip64 support without generating gigantic
archives.  Hmmm...
libarchive/archive_read_support_format_zip.c
libarchive/archive_write_set_format_zip.c
libarchive/test/main.c
libarchive/test/test.h
libarchive/test/test_write_format_zip.c
libarchive/test/test_write_format_zip_no_compression.c
libarchive/test/test_write_zip_set_compression_store.c