You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The maximum amount of entries supported by the original zip format is 65535 (stored in two bytes in the header). If the zip file contains more than that it should set it's entry count to 0xFFFF, putting the real count inside the extended Zip64 header. How were you doing step 1?
The zip file I tried to examine is part of game Kingdom Come: Deliverance (Localization\English.pak). So the file was created using Cryengine resource compiler. When I opened the file with 7-zip, it has shown 75405 files, while opening it with the code above has shown only 9869. Then I tried Ionic.zip and it also says, there is 75405 files inside.
The overflow is in whatever created the archive. Instead of putting a 0xFFFF in the length field that would indicate that the extended header should be used, they just put the bottom 16 bits of the length in the field.
It's possible to change the logic to look for Zip64 headers regardless of the length value.
Activity
piksel commentedon Dec 10, 2018
The maximum amount of entries supported by the original zip format is 65535 (stored in two bytes in the header). If the zip file contains more than that it should set it's entry count to 0xFFFF, putting the real count inside the extended Zip64 header. How were you doing step 1?
tgrunwald commentedon Dec 11, 2018
The zip file I tried to examine is part of game Kingdom Come: Deliverance (Localization\English.pak). So the file was created using Cryengine resource compiler. When I opened the file with 7-zip, it has shown 75405 files, while opening it with the code above has shown only 9869. Then I tried Ionic.zip and it also says, there is 75405 files inside.
piksel commentedon Jan 30, 2019
The overflow is in whatever created the archive. Instead of putting a
0xFFFFin the length field that would indicate that the extended header should be used, they just put the bottom 16 bits of the length in the field.It's possible to change the logic to look for Zip64 headers regardless of the length value.
A PR would be welcomed!
piksel commentedon Jun 18, 2019
Closed in favour of #357