I need to transfer a huge file from local machine to remote machine using libcurl with C++. Is there any compression option available in-built with libcurl. As the data to be transferred is large (100 MB to 1 GB in size), it would be better if we have any such options available in libcurl itself. I know we can compress the data and send it via libcurl. But just want to know is there any better way of doing so.
Note: In my case, many client machines transfer such huge data to remote server at regular interval of time.
thanks,
Prabu
According to
curl_setopt()and optionsCURLOPT_ENCODING, you may specify:Here are some examples (just hit search in your browser and type in
compression), but I don’t know hot exactly does it work and whether it expect already gzipped data.You still may use
gzcompress()and send compressed chunks on your own (and I would do the task this way… you’ll have better control on what’s actually going on and you’ll be able to change used algorithms).