Re: Writing data to a char buffer instead of a file
Date: Tue, 13 May 2008 09:44:19 +0200 (CEST)
On Tue, 13 May 2008, Yuriy Sosov wrote:
> I need the the output in a char buffer and not a file. I also want it to be
> fast. I can implement it in a callback function, but it would be better
> though if it was a standard feature.
Why so? The callback is the standard feature and there are probably hundreds
of applications out there that use it to store the received data in memory
instead of to a file.
> I have noticed this thread: Prevent copying of data between curl buffer and
> user provided buffer http://curl.haxx.se/mail/lib-2005-10/0043.html
> Did anything useful come out of this discussion?
That discussion is useful mostly for the less number of copies it would imply
I think. But no, nothing useful did come out of that discussion as of yet and
frankly I have my doubts that it will be possible to do anything like that
nicely without wrecking the internals completely.
But if you're prepared to get your hands dirty and work on it, I'll offer my
ideas, advice and reviews.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2008-05-13