Add ZIP64 support to wxZipInputStream and wxZipOutputStream.

Zip archives with sizes larger 4GB or containing files larger than 4GB or more
than 65k files are saved in ZIP64 format which adds a few additional footers
and extra fields to allow to exceed these limits.

This implements the PKWARE specification available at:
https://www.pkware.com/support/zip-app-note

It has been tested for compatibility with Windows internal ZIP folders, OSX
Archive Utility and 7-zip.

Closes https://github.com/wxWidgets/wxWidgets/pull/72
This commit is contained in:
Tobias Taschner
2015-08-13 14:27:24 +02:00
committed by Vadim Zeitlin
parent 0f39ea0963
commit b9d46f0719
3 changed files with 240 additions and 34 deletions

View File

@@ -234,6 +234,8 @@ private:
size_t WriteDescriptor(wxOutputStream& stream, wxUint32 crc,
wxFileOffset compressedSize, wxFileOffset size);
bool LoadExtraInfo(const char* extraData, wxUint16 extraLen, bool localInfo);
wxUint8 m_SystemMadeBy; // one of enum wxZipSystem
wxUint8 m_VersionMadeBy; // major * 10 + minor