简体   繁体   中英

dotnetzip zipping large files - Unity app stops responding

I'm using dotnetzip in my Unity3d Project for zipping/unzipping files. I am using a code similar to below to zip some part zip files. If the files are small everything works as expected. But if these files are large(each one around 100mb) then the Unity app(exe) stops responding. I don't get any errors. But I think it's due to memory issues because it works if the files are small.
Can you please tell me how to fix this issue.

  String[] filenames = { "ReadMe.txt", "c:\\data\\ABC_ExportContent.zip.001", "c:\\data\\ABC_ExportContent.zip.002", "c:\\data\\ABC_ExportContent.zip.003"};
  using (ZipFile zip = new ZipFile())
  {
    zip.AddFiles(filenames);
    zip.Save("Archive.zip");
  }

Update - Today I tested this with the Task Manager opened, and the app becomes not responding due to CPU usage goes to 100%. Not actually due to memory as I guessed. Please let me know how to overcome this issue.

Update 2 - Since I couldn't find a solution for this, decided to move to SharpZipLib and so far it seems to be doing good.

我们通过使用SharpZipLib而不是dotnetzip来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM