tags:

views:

14

answers:

1

I need an iphone app to post data from time to time to a webservice. Can the iphone post the data in a gzip format? if yes, can you point me in the right direction on how to accomplish this

Thanks

+1  A: 

Check out this I used it for a while and it was easy to get working. One note: I didn't need an of the openssl stuff, so I just commented out the relevant #includes as well as the Hash functions.

Basically, this code defines several methods on NSData, e.g. -[NSData gzipDeflate] which returns NSData* for your gzipped content.

As for the actual posting, I don't have an answer for that part.

westsider
did you use this for unzipping or for zipping?
Quotient
I only used it for zipping (deflating). Eventually, though, we decided to switch from gzip to zip. At that point, I changed to another set of code because I didn't want to handle all the headers and trailers needed to wrap zipped data into a file.
westsider