Are they any classes or libraries to read a gzipped stream from a server? For example, Java has the GZIPInputStream and GZIPOutputStream classes to read from a gzipped stream. Does iPhone SDK have such libraries or are there any external libraries that we can use?
+3
A:
Is this a web server, and can you tell it that the content encoding is gzip? If so, apparently NSURLRequest accepts gzip encoding transparently. In other words, you can make a request which looks like it's going to get the uncompressed data, the server can deliver gzip compressed data, and when you read it you'll get it decompressed already. You just need to be able to tell the server what's going on, really.
Jon Skeet
2009-09-10 06:00:02
So basically the server needs to set the Content-Encoding to gzip when sending out a gzipped stream right?
Ram
2009-09-10 06:27:54
Yup, I believe so - but without *re-compressing* the data :)
Jon Skeet
2009-09-10 07:02:56