How to download a zip file and unzip it?

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

  1. mikezang macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #1
    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

    Joined:
    Oct 18, 2007
    Location:
    Chicago-area
    #2
    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

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #3
    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

    Joined:
    Jul 22, 2009
    #5
    Download a zip file and unzip file

    you will go through this link http://www.winzip.com/downwz.htm and there is one option free win zip download you will click there.
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    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

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan

Share This Page