I assume that the gzip only applies to the body of the response/request and not the headers. If so, this is probably outside of HttpClient's scope (not that I wouldn't encourage such input/output streams from being added to the contrib package). We do support ChunkedEncoding so it might be considered acceptable.

The way this functionality would be achieved would be something similar to:

GetMethod get = new GetMethod("http://blah.com";);
client.execute(get);
InputStream in = new GZipInputStream(get.getInputStream());
// do stuff with in.
get.releaseConnection();

The input stream retrieved from the method would return the gzip encoded data and the GZipInputStream would read that, decompress it and return the actual data. A similar process would be applied to the output stream.

Hope that makes sense....

Adrian Sutton.

On Wednesday, July 2, 2003, at 02:48 AM, Mark R. Diggory wrote:

We just started trying to work with gzipped content and HttpClient. Currently this means sending gzip format files using multipart post and ungziping the content coming from GetMethod requests (Since its all often alot of redundant XML this really speeds things up).

Are there any thoughts on the idea of providing GZipInputStream/GZipOutputstream capabilities within HttpClient? I wasn't recognizing any capability for this in the codebase, maybe I'm missing something if its there.

Cheers,
-Mark

--
Mark Diggory
Software Developer
Harvard MIT Data Center
http://www.hmdc.harvard.edu



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to