Commit graph

4 commits

Author SHA1 Message Date
Colin Cross
06eea2c9b8 Store real number of records in regular end record when possible
Only store uintmax for the number of entries in the regular end record
if it doesn't fit.  p7zip 16.02 rejects zip files where the number of
entries in the regular end record is larger than the number of entries
counted in the central directory.

Fixes: 187485108
Test: TestZip64P7ZipRecords
Change-Id: I0d116e228a0ee26e4e95bb3f35771da236a056eb
2021-05-08 00:18:04 +00:00
Colin Cross
373147baa9 Support writing a ZIP64 file header
If the length of a stored file is more than 2^32 and a data descriptor
is not being used then a ZIP64 extra is required in the file header to
store the uncompressed and compressed lengths.

Bug: 175055267
Test: TestCopyFromZip64
Change-Id: Id414b4c04f48aefabfd835bd8339333d36576375
2020-12-17 15:08:50 -08:00
Jeff Gaston
c5eb66d16b Have soong_zip not write a data descriptor for non-compressed files
Bug: 64536066
Test:  m -j blueprint_tools && cd /tmp && mkdir zip && \
       cd zip && touch empty-file && \
       echo empty-file > files.list && \
       soong_zip -o zip.zip -C . -l files.list && \
       jar -xvf zip.zip && echo ok

Change-Id: Iac5797aab5282237fa1cc902e6b068a7937c012a
2017-08-24 14:43:35 -07:00
Dan Willemsen
25a4e07df8 Add archive/zip from go1.7rc5 tag
In preparation to patch in some custom functionality (parallel
compression and zero-decompress zip to zip copying)

Change-Id: I96a36efc09c715f6b55290af40ebfdde9ae72e33
2016-08-10 16:10:16 -07:00