extract zlib file in iOS?

心不动则不痛 提交于 2019-12-25 06:37:37

问题


When downloading data from a server thats compressed using zlib, I was wondering what steps are needed to take to uncompress and save to core data

any help would be greatly appreciated


回答1:


Use something like ASIHTTP to retrieve the file off the network. That can handle gzip which is likely what the data coming off the network is compressed with.

If you'd prefer to roll your own, take a look at this zlib category on NSData: Has worked well for me in the past and likely does what you'll need.

You'll also need to add -lz to the "other linker flags" build setting



来源:https://stackoverflow.com/questions/6066965/extract-zlib-file-in-ios

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