Reputation: 11
I am using minizip version 3.0.0.8 and zlib 1.2.
I have the functionality to export zip files in quite a bit of software. It saves all files in the archive with Zip64 characteristics. The exported archives have the extension .bcf which allows me to open the archive in other programs such as BimCollab BCF Manager (concretely a plug-in for Archicad). This is where I run into a problem because archives where the files were saved with the Zip64 characteristic are not read in their entirety by this program. If I save the file to the archive as a regular file without Zip64 then everything is fine. It seems to me that this particular program has a problem with reading such archives, in which there is a file saved with Zip64 characteristics.
I save the archive files using zipOpenNewFileInZip4_64(), give it 1 for int zip64 to save the file with Zip64 characteristics. After tracing further after calling zipOpenNewFileInZip4_64(), I land in minizip in the zipOpenNewFileInZip5() function. There is an interesting condition in line 109. In addition to these two flags MZ_ZIP64_FORCE and MZ_ZIP64_DISABLE, there is an enum MZ_ZIP64_AUTO, not used here.
It needs to maintain the functionality of saving files with Zip64 because there are files over 4GB. When I change the MZ_ZIP64_FORCE flag in the minizip project to MZ_ZIP64_AUTO then the file will be saved with Zip64 only when the situation calls for it. After initial testing it seems to work.
I would like to ask in what other, more correct way can I use the MZ_ZIP64_AUTO flag?
Upvotes: 1
Views: 57