0

I have a unique and interesting difficulty: I need to find a way to (semi-)permanently store an html page on the iPhone, but the protocol and method I choose is up to me: for example, I could request that the files be packaged in a zip archive, then download it via a URL and unzip it on the iPhone to store/view. I think it would be complicated to download the page using straight html (see this question), and URLCache seems to be designed to download one resource at a time.

Does anyone have any suggestions for a system that will make this task relatively simple without adding significant time to till I can display the page on-screen?

Community
  • 1
  • 1
JoBu1324
  • 7,751
  • 6
  • 44
  • 61
  • I think the zip archive will be your best approach. – drawnonward Jul 05 '10 at 00:21
  • Do you know how much overhead unzipping a package would entail, especially on a 3G or earlier iPhone? – JoBu1324 Jul 05 '10 at 07:13
  • Check out http://www.winimage.com/zLibDll/minizip.html -- if you want an already made (but not exactly fantastic) wrpaper for obC there is one called ZipArchive. Test that and you'll know overhead and such first-hand. – Kalle Jul 11 '10 at 11:35
  • I'll check it out and update the question with my results, thanks Kalle! – JoBu1324 Jul 22 '10 at 03:29
  • Kalle, ZipArchive did the trick, although you're right it isn't fantastic. I'm only using it for unzipping though, so it works fine. Put you're comment in an answer, and I'll select it as the answer. – JoBu1324 Jul 29 '10 at 17:25

1 Answers1

0

I decided to go with the suggestion by Kalle, since I didn't need the zip program to do any heavy lifting. Unzipping is surprisingly fast, so it suits my purposes very well. I may have to clean up the code a bit though.

JoBu1324
  • 7,751
  • 6
  • 44
  • 61