Hi fellow overflowers, i need to decode a large zip file (around 20mb) on the ipad. Is there a way to parse the zip file in chunks? Ideally i would like to pass the decoder (let's say) 512k of data at time, and get back a chunk of decoded data, because i have a feeling that loading all the file in memory and then decompress it could lead to severe memory problems. A pointer to some incremental decoding libraries would be nice!
Thanks, Giuliano
UPDATE: the link provided by Matt in his answer worked fine for me ;)
Have you tried objective-zip? http://code.google.com/p/objective-zip/
There's an example near the bottom of http://code.google.com/p/objective-zip/wiki/GettingStarted, showing how to read big files.
I have achieve unzipping files using GCD. This examples uses unzipping of files in different thread and when done it notifies main thread and main thread updates the information.... Hope this may also be solution to your problem....
http://www.raywenderlich.com/4295/multithreading-and-grand-central-dispatch-on-ios-for-beginners-tutorial
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With