brendan-duncan / archive

Dart library to encode and decode various archive and compression formats, such as Zip, Tar, GZip, ZLib, and BZip2.
MIT License
395 stars 130 forks source link

Out of memory error in unpacking a correct 2mb ZIP file on IOS #304

Open LucaBoss74 opened 7 months ago

LucaBoss74 commented 7 months ago

Hi, in an application we develop we need to unpack (via expandFileToDisk) a 2MB zip file downloaded from our server. It's a zip holding 100 small SVG files. It's a 64bit ZIP made on Linux platform. On IOS, with version 3.4.9, we experience "Out of memory" error during unpack the file. On other platforms (our application works in Linux, Android and Windows too) we have no problem. If I force the 3.3.9 version in dependancies, everything works without problems. We haven't tested all 3.4 releases.

If you need it I can push the ZIP file too, but please do not share it because contains images which we bought for our applications and cannot be shared publicly.

brendan-duncan commented 7 months ago

There was some changes in file streaming around the 3.4 time period. They were designed to reduce memory usage. Clearly iOS doesn't agree. I'll try and dig into it. A zip that size shouldn't be running out of memory.