在没有临时文件的情况下解压缩NSData [英] Unzip NSData without temporary file

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

问题描述

我找到了几个库( LiteZip ZipArchive )允许在iPhone上解压缩文件。但是它们都需要输入作为文件。是否有一个库允许直接解压缩包含zip存档数据的NSData而不将其写入临时文件?

我试图采用上面提到的libs,但到目前为止没有成功。

I've found a couple of libs (LiteZip and ZipArchive) that allow to unzip files on iPhone. But both of them require an input as a file. Is there a library that allows to directly unzip NSData containing zip-archived data without writing it to temporary file?
I've tried to adopt mentioned above libs for that, but with no success so far.

推荐答案

此答案这个问题,我指出CocoaDev wiki NSData上的类别,它为该类添加了zip / unzip支持。这可以让你完全在内存中完成。

In this answer to this question, I point out the CocoaDev wiki category on NSData which adds zip / unzip support to that class. This would let you do this entirely in memory.

这篇关于在没有临时文件的情况下解压缩NSData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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