ITADN

MZ_STREAM_ERROR when trying to write to split archive with >50GB split size

#961Openoijroiwjer2134313 创建于 2026-02-11
disk splittingbug
Hi, I am currently working with https://github.com/zlib-ng/minizip-ng/commit/55db144e03027b43263e5ebcb599bf0878ba58de and am having troubles when trying to write to archives with very large split sizes. ``` const LONGLONG zipSize = 50LL * 1024 * 1024 * 1024; zipStream = mz_stream_os_create(); zipWriter = mz_zip_writer_create(); val = mz_zip_writer_open_file(zipWriter, szZIPPath, zipSize,0); if (val != MZ_OK) { //log error } mz_zip_file fileInfo = { 0 }; fileInfo.filename = newPath.c_str(); fileInfo.modified_date = FileTimeToUnixTime(modification); fileInfo.creation_date = FileTimeToUnixTime(creation); fileInfo.accessed_date = FileTimeToUnixTime(access); fileInfo.compression_method = MZ_COMPRESS_METHOD_DEFLATE; fileInfo.zip64 = MZ_ZIP64_AUTO; fileInfo.uncompressed_size = nFileSize; fileInfo.version_madeby = MZ_VERSION_MADEBY; fileInfo.flag |= MZ_ZIP_FLAG_UTF8; // Open the ZIP entry err = mz_zip_writer_entry_open(zipWriter, &fileInfo); // code to write the entry mz_zip_writer_entry_close(zipWriter); //code to eventually close the zipwriter ``` This all works fine as long as my zipSize stays at 50GB or lower. Once I set it to more than 50GB I get an MZ_STEAM_ERROR when calling `mz_zip_writer_entry_open(zipWriter, &fileInfo);` Am I missing something here / doing something fundamentally wrong? Thank you for your help!
0 条评论