tags:

views:

44

answers:

2

I want to download a 90MB sqlite file to my iphone app from the web. So I'll need to save the data to disk as it comes in to avoid having too much in memory. This is similar to this question - http://stackoverflow.com/questions/648275/best-way-to-download-large-files-from-web-to-iphone-for-writing-to-disk

But I'd like to zip the file if possible. How can I handle unzipping such a large file? It's about 20 MB zipped.

A: 

You could use this NSData category.

tob
+1  A: 

Use zlib (http://www.zlib.net/) so you will decompress while downloading and not after the download is complete, this will make the decompression happen while you wait more data from the net. You can find some sample code on how to use zlib also in the link tob posted.

Michele Balistreri