"解压"在iPhone上的文件 [英] "Untar" file on iPhone

查看:178
本文介绍了"解压"在iPhone上的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个从Web服务器下载tar-gzip文件的iPhone应用程序,然后需要取消归档此文件,以便将其复制到应用程序的Documents文件夹中。

I'm writing an iPhone app which downloads a tar-gzipped file from a Webserver, then needs to unarchive this file so that it can be copied into the app's Documents folder.

我正在使用tar / gzip,因为我想在一个HTTP请求中下载一大堆小文件,以使一切变得美观和快速。

I'm using tar/gzip because I want to download a whole bunch of small files in one HTTP request, to make everything nice and fast.

I已经调查了像 http://www.feep.net/libtar/ 这样的解决方案,但作为C / Objective-C newb,我无法让他们中的任何一个为iPhone平台编译。

I've investigated solutions like http://www.feep.net/libtar/, but as a C/Objective-C newb, I can't get any of them to compile for the iPhone platform.

(我觉得我应该能够进行系统调用到tar -zxvf myfile.tar.gz,但它看起来并不那么容易!)

(I felt like I should just be able to do a system call to "tar -zxvf myfile.tar.gz", but it would appear it's not that easy!)

所以有一种简单的方法可以解压缩文件在iPhone上?或者我是否认为这是错误的,有更好的方法吗?

So is there a simple way to just un-tar a file on the iPhone? Or am I going about this all wrong, and is there a better way to do this?

提前致谢!

Nik

推荐答案

此博文应该可以帮助您:
http://blog.hawkey.org/?p=332

This blog post should help you: http://blog.hawkey.org/?p=332

编辑:同一页面的Google缓存版本实际上链接到论坛帖子链接到此处的Google Code项目,包含一些在iOS上实现解压缩的代码。

Google cache version of the same page which actually links to a forum post here which links to a Google Code project here, containing some code which implements unzipping on iOS.

这篇关于"解压"在iPhone上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆