views:

248

answers:

1

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 uncompress on android ???

+1  A: 

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.

Dave Webb
This might not even be required -- I wrote a class using `DefaultHttpClient` the other day and it automatically accepted and decompressed gzipped responsed without me doing anything special whatsoever. That was on a PC, but I don't see why the behaviour should be any different on Android.
Christopher