cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how libcurl receives chunked data from http server?

From: Pixel <pixel_at_quantumchamaeleon.com>
Date: Tue, 23 Sep 2003 13:59:43 -0400

> Daniel,
> I have seen this before.
> It show us what we can do in order to store the whole response in memory
> I thought libcurl *internally* can keep the whole response in memory. I
> misunderstand it
>
> what my application does is to receive huge image data and display it, not
> the files, so I need to keep it in the memory
>
> - Jerry

Just out of curiousity, wouldn't the transmission of "huge image data" over
a network (an assumption by me since you're using libcurl in the first
place) connection make the time it takes to copy the data once into a
contiguous memory area pale in comparison? The example provided does keep
the data in memory, no files. It just happens to reallocate to make the area
grow as necessary. Making the growth optimized for a particular application
is an implementation-specific detail (not inside libcurl, inside your
application).

Lars Nilsson
Quantum Chamaeleon
http://www.quantumchamaeleon.com

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-23