android httprequest compress response
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.
精彩评论