curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Continue Download C++ Implementation

From: Tomalak Geret'kal via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 8 Dec 2020 16:13:29 +0000

On 08/12/2020 15:49, Tomas Berger via curl-library wrote:
> I have been trying to be able to continue a download from
> a half finished state, my write function is rather simple,
> but I have a couple of couts.
> The idea is to download to a temporary file, and when the
> download is complete copy, and remove the tempfile
> Relying onĀ  CURLOPT_RESUME_FROM_LARGE to help me continue
> from where I left of, with the size of what was downloaded
> before as its parameter
> I also rewrite 2 bytes, so that my cout can make sure that
> the same offsets get the same bytes

> But the zip file can not be unzipped, and their sha256 sum
> is different, so something went wrong.
> I assume I might have made an logical error, but I can see
> where.
> I hope you guys can help me see where I have gone wrong.

Compare the bytes of the file you wrote to the bytes of your
reference file (ZIP).

Where do they diverge? Do they diverge near your "join"?
Elsewhere?

Are you sure this problem relates to the "continue"
semantics? Your output doesn't seem to prove that.

Cheers



-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2020-12-08