cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Support for automatic decompression of responses

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 23 Jun 2002 22:59:51 +0200 (MET DST)

On 21 Jun 2002, James Gallagher wrote:

> I see on the libCURL todo list that adding support for automatic
> decompression of responses is pretty high on the list. Is anyone working on
> this?

The TODO list isn't actually sorted in relevance order, but anyway, I'd still
like libcurl to support decompression...

> I'm pretty new to the library, but if someone can give me a few pointers,
> I'm willing to do the work.

I'm not sure what kind of pointers you need, but I think I am capable of
providing some!

The main piece of the action is done in Curl_readwrite()
http://curl.haxx.se/lxr/source/lib/transfer.c#L175

That's where libcurl receives data from a remote source and calls the write
callback accordingly. If the stream is compressed, it'll need to be
decompressed before passed-on.

The decompression must not start until all the headers have been received.

Please familiarize yourself with that function, and feel free to ask
questions. I'm still around for... three more days before my vacation! ;-)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Received on 2002-06-23