iPhone and GZip

后端 未结 1 1248
误落风尘
误落风尘 2020-12-09 01:02

Now I know that xCode automaticly does the GZip decrompession for you within:

NSData *data = [NSData dataWithContentsOfURL:URL];

And it doe

相关标签:
1条回答
  • 2020-12-09 01:14

    If you download something with content type application/x-gzip, the url loading system will not decompress it for you. I think the data that you received is still gzip encoded.

    You can use my NSData additions to deal with this. See http://github.com/st3fan/cocoa-utils/blob/master/src/NSDataGZipAdditions.m

    0 讨论(0)
提交回复
热议问题