开发者

android httprequest compress response

开发者 https://www.devze.com 2022-12-17 10:37 出处:网络
I am using httprequest to retrieve data from webservice, i know using tomcat we can compress response data using gunzip algo.

I am using httprequest to retrieve data from webservice, i know using tomcat we can compress response data using gunzip algo.

but how can uncompress data to display, is un-compress is time consuming?? is there any other way to compress response and unco开发者_StackOverflowmpress on android ???


There's an example on the Apache website showing how to do gzip decompression with HTTPRequest and DefaultHTTPClient. (You can find the full list of HTTPClient examples here.)

As for how time consuming it is, the best way to find this out for your data is to profile the processing compressed and uncompressed data in your app. This is pretty easy to do with the traceview tool.

0

精彩评论

暂无评论...
验证码 换一张
取 消