Tag Archives: wget

NSURLConnection gzip magic

For quite some time I ranted about not being able to use compressed network communcation out-of-the-box on the iPhone.

Despite being undocumented (or I just overlooked the hint), NSURLConnection does gzip decompression transparently!

That’s how to use it:

ensure the webserver sends gzipped content, use e.g. wget to verify:
$ wget –header=’Accept-Encoding: gzip’ \
–server-response …