Commit Graph

3 Commits

Author SHA1 Message Date
Tianjie 85c5d23100 Allow parsing zip entries larger than 4GiB
This cl supports the parsing and extraction of the zip entry who
has a large size than UINT32_MAX. Also add a few checks in the
entry writers to make sure callers have enough space for extraction.

As many users of the library assume the entry size to be 32 bits long,
we keep the 32 bit ZipEntry. We also keep the functions that expect
the 32 bit ZipEntry in the public header file. These 32 bit wrappers
could be removed later once all users recognize the 64 bit ZipEntry.

Bug: 150900468
Test: unit tests pass
Change-Id: Ia6760638ccf51e97dbef6bd55dff352f1e7ce816
2020-04-03 12:46:20 -07:00
Tianjie Xu 69ee4b70c8 Add definition for zip64 struct
Add the definition of zip64 related structs. Also add place holders in
the zip parsing code. In addition, this cl changes the variable type of
num of entries to uint64_t. The number was capped at UINT16_MAX in zip32
format.

Bug: 150900468
Test: unit tests pass
Change-Id: I51a39e7b993fa376e0d050a04b8d39abae8a9e15
2020-03-20 22:23:57 -07:00
Elliott Hughes 8748bcc650 Rename unzip.cpp to ziptool.cpp.
It contains unzip and zipinfo, and will likely contain zip too soon.

Test: builds
Change-Id: I017df302108847f29bfdd120f20bf0fd3b9caa5b
2019-12-13 16:47:22 -08:00