I am sure this is not too complicated (and I am surprised that I cannot understand), but here goes:
So. I use gzcompress () to compress JSON data in PHP, so I can send it to an iPhone app.
Some problems raise the question of how to unzip this data on iPhone (iOS).
Any thoughts? I am collecting data through NSMutableURLRequest.
Thanks!
The code making the request:
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:theURL]]; [[NSURLConnection alloc] initWithRequest:request delegate:self];
Response code processing:
NSString *responseString = [[[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding] autorelease];
And on the PHP side:
echo(gzcompress(json_encode($lines)));
Thanks!!!
source share