tinhead
tinhead

Reputation: 385

extract zlib file in iOS?

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

Upvotes: 0

Views: 3629

Answers (1)

Dan Bennett
Dan Bennett

Reputation: 1450

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

Upvotes: 1

Related Questions