开发者

tar extraction in iphone SDK?

how can i extract tar file in iphone Sdk?i tried both miniZip and libZ.dylib, it extracts only .gZ file. i decompressed my.tar.gZ file into my.tar.but h开发者_运维百科ow can i extract again tar file?any one can help?


I've a home maid solution for you: https://github.com/mhausherr/Light-Untar-for-iOS

It's lighter than lib archive and may work for your use.

Complete discussion about that: http://blog.octo.com/en/untar-on-ios-the-pragmatic-way/


The best library I've found is libarchive. It is well-designed, well-documented, and fast.

I just created a repository on GitHub that has the tools to build libarchive and libbz2 as static libraries for iOS 4.2+. (It should be possible to use it to target 3.x, too.)

http://github.com/davepeck/iOS-libarchive/

In other related questions on Stack Overflow, people have pointed out that libarchive is included in the SDK. This is not quite true. The binary libarchive.2.dylib is included, but the headers are not. The same applies to libbz2 (but, oddly, not to libz.) This means that libarchive is considered a private API -- in other words, you can't use it if you intend to ship on the App Store. Hence my repository.


Have you looked at libtar?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜