How to download a zip file and unzip it?

Discussion in 'iOS Programming' started by mikezang, Jun 23, 2010.

  1. mikezang macrumors 6502a

    May 22, 2010
    Tokyo, Japan
    I need to download a zip file and unzip it in my app, what can I do?

    Can I use unlha32.dll(unzip library) in my app?
  2. RonC macrumors regular

    Oct 18, 2007
    Probably not...

    1 question and 1 suggestion:

    • Question: WHY? Can it be unzipped at the source and downloaded unzipped?
    • Suggestion: I'd start by searching google for open-source unzip code (think about what's in gunzip, for example). Unzipping is much easier than zipping, since all the hard work (the encoding) has already been done. You simply have to do what it says.
    This you probably can't do. DLLs are Window's things, aren't they? There may be a library hiding in the Apple library, but I'm not familiar with that.

    Ron C
  3. bredell macrumors regular

    Mar 30, 2008
    Uppsala, Sweden
    Support for gzip compression is already built into the phone through the zlib(3) library, your app can download a gzipped file and use the zlib library to decompress it. I'm not sure it there's support for ordinary zip files though.

    But you should also keep in mind that when you access a file through the web, the web server usually compresses the file on the fly and the client decompresses it. So you might not need to do the compression/decompression yourself.
  4. offshoredevelop macrumors newbie

    Jul 22, 2009
    Download a zip file and unzip file

    you will go through this link and there is one option free win zip download you will click there.
  5. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    I believe the OP is asking about unzipping a file from within a iOS application. If so, WinZip is not even close to providing a solution.
  6. mikezang thread starter macrumors 6502a

    May 22, 2010
    Tokyo, Japan

Share This Page