ASIHTTPRequest的zlib压缩
问题描述:
我想解压缩一些数据,即时得到它正在与zlib的压缩,但即时得到在我的代码一个警告,我不知道如何改正。ASIHTTPRequest的zlib压缩
- (void)requestFinished:(ASIHTTPRequest *)request
{
responseData = [request responseData]; //Pass compressed data from server over to NSData variable might use to check size
NSData *uncompressedResponseData = [[NSData alloc] init];
uncompressedResponseData = [[request responseData] zlibInflate]; //error here
//Is this where I have to think about decompression? or do I pass this data out to another method?
}
错误读取,
Receiver type 'NSData' for instance message dose not declare a method with selector 'zlibInflate'
任何帮助,将不胜感激
答
的问题是,你调用一个方法,zlibInflate
,对象不支持该方法上:NSData
表示一些任意数据,并且不知道任何关于解压缩数据的内容。
你确定你想尝试缩小你回来反正这些数据? ASIHTTPRequest不为你处理膨胀(如果服务器返回了gzip的数据)?
,如果你只是对待NSData
你回来,就好像它已经被夸大,会发生什么?
也看到changelog,特别是部分题为“在即时的gzip解压缩”。
是的,我想我只是要去gzip,因为我没有在zlib的东西进展。我只是在没有处理数据的情况下找回一堆数字。 – 2011-12-13 23:04:02