Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top