zlib directly for uncompressing a zip folder for iphone

我只是一个虾纸丫 提交于 2019-12-04 15:30:26

As JosephH said, you cannot use ZLib to deal with .zip files.

But you can use the MiniZip library for that: http://www.winimage.com/zLibDll/minizip.html

There's already an Objective-C wrapper, if you don't want to write yours: http://code.google.com/p/ziparchive/

FYI - ZLib on iPhone:

Adds libz to the linked frameworks of your main target, just as another framework.

Then, you can check the ZLIB tutorials, to learn how to compress/decompress a file: http://www.zlib.net/zlib_how.html

zlib does not directly support the .zip file format, sorry.

It can be done though, contrib/minizip in the zlib distribution provides an example. (link to code: http://cvsweb.xfree86.org/cvsweb/utils/zlib/contrib/minizip/miniunz.c?rev=1.1&content-type=text/vnd.viewcvs-markup )

I'm unsure why you're against open source libraries, but http://bitbucket.org/kolpanic/zipkit/wiki/Home is a great solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!