Closed brendand closed 8 years ago
That's a great idea! The extractBufferedData:fromFile:error:action
call is newer and I didn't think to go back and use it there. I'll take a look at your pull request as soon as I can.
This has been addressed in PR #28 and will be released in v1.7
v1.7 is live on CocoaPods now, including this fix. Thanks again @brendand for all the hard work!
No, thank you for making this awesome library!
Different from the 64 bit issue, this time my iOS app aborts when I attempt to unzip an archive that contains a file that expands to 1.4 GB. The zipped archive itself is 775 MB, but unzips much larger. There are other files in the archive, but the main file is this big 1.4 GB file.
The issue is in the
extractFilesTo:overwrite:progress:error
method. It reads the entire file from the archive into memory and then writes it out. Specifically right off the bat, thereadFile:length:error
method allocates an NSMutableData object that's as big as the file. Boom on iOS!Instead, I would recommend using your own
extractBufferedData:fromFile:error:action
method to unzip all the files in an archive. That way you improve memory usage considerably and then it doesn't matter how big any individual file is.