Best archiver library for iOS [closed]

三世轮回 提交于 2019-12-03 08:50:23
Ondrej Peterka

I used Objective Zip and it worked quite well on iOS4. Work with this library is easy as this:

ZipFile *zipFile= [[ZipFile alloc] initWithFileName:@"test.zip" mode:ZipFileModeCreate];
ZipWriteStream *stream= [zipFile writeFileInZipWithName:@"abc.txt" compressionLevel:ZipCompressionLevelBest];
[stream writeData:abcData];
[stream finishedWriting];

Unzipping is done in similar fashion.

I can recommend it, but I can not provide any comparison to others. You can see on the wiki also some other libraries, which are based on this one. I hope this will help you a little.

For file archive, until now I found these libraries

(Naively sorted by todays 2013-04-16 github stars)

I only tried ZipArchive because I needed zip format and password protected archive creation. It seems to do the job pretty well until now.

ZipZap is the solution I find most appealing. It has the advantage of only depending on the zlib the SDK provides.

The best way is to use zlib directly. No library dependency, just zlib, that you will probablity have in your project already

Look here How to gzip Data in Memory Using Objective-C

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