]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Support experimental "at" extra block for better streaming.
authorTim Kientzle <kientzle@acm.org>
Mon, 30 Dec 2013 04:57:17 +0000 (20:57 -0800)
committerTim Kientzle <kientzle@acm.org>
Mon, 30 Dec 2013 04:57:17 +0000 (20:57 -0800)
commitfbda7af0e529c53a8265af1f2d70a02bbea50ecd
tree36a2d6b13499d90f05395d95cc9d41fc0f5ea79b
parentdf31ae11f1f52cb1d08c203f5d68d2e110fed815
Support experimental "at" extra block for better streaming.

The writer now writes this extra block with every local
file header; the reader recognizes it and uses it.
This allows streaming extraction to properly restore
file permissions and symlinks.

Without this, streaming extraction of Zip archives is
somewhat hobbled by the lack of full information in
the local file header.

Here's a detailed description of the new extra block.
The details here are subject to change at any time.

   -Extended Local File Header Extra Field (0x7461):

      The following is the layout of the extended local file
      header "extra" block.  This allows information to be
      included with the local file header that could previously
      only be stored with the central directory file header.

      Note: all fields stored in Intel low-byte/high-byte order.

        Value      Size       Description
        -----      ----       -----------
        0x7461     2 bytes    Tag for this "extra" block type
        Size       2 bytes    Size of this "extra" block
        Version
        Made By    2 bytes    See "Version Made By" above
        Internal File
        Attributes 2 bytes    See "Internal File Attributes" above
        External File
        Attributes 4 bytes    See "External File Attributes" above

      This extra block should only be used with the local
      file header.  The values stored should exactly match
      the corresponding values in the central directory
      file header.
libarchive/archive_read_support_format_zip.c
libarchive/archive_write_set_format_zip.c
libarchive/test/test_write_format_zip.c
libarchive/test/test_write_format_zip_compression_store.c
libarchive/test/test_write_format_zip_file.c
libarchive/test/test_write_format_zip_file_zip64.c