开发者

extract zlib file in iOS?

开发者 https://www.devze.com 2023-03-07 16:44 出处:网络
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

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 gre开发者_如何学JAVAatly appreciated


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

0

精彩评论

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