Quazip too many files

144 Views Asked by At

I'm having a problem with QuaZip.

I have a program that extracts files from zip archives. The unzip library I was using hadn't been maintained in about 10 years and had problems with the archive contained more than about 65000 files, so I converted my program to use QuaZip.

It turns out that QuaZip has the same problem. I have an archive that 7-Zip shows has 67946 objects. QuaZip only sees 2397 files. ZipInfo also shows only 2397 files. It appears that these tools have not been updated for the newer zip64 format, although QuaZip does seem to use QuaZipFileInfo64 which presumably is there to support the ZIP64 format. Also, Wikipedia documents QuaZip as supporting the new format.

Calling getEntriesCount() for the quazip object returns 2397. Using the JlCompress::getFileList code to get the list of files only returns 2397.

Not 100 percent sure what I am asking. Does QuaZip support more than 65500 files in an archive? If so, is there a reason why it would be acting as if it doesn't?

1

There are 1 best solutions below

0
Rachel Gold On

As I suspected in my last comment, the number of entries field in the central directory header is incorrect having overflowed on the creation. The solution I came up with was to remove the code in unzGoToNextFile that assumes that that entry is correct.