system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does pausing and resuming downloads work?
gpt
The file being downloaded is a simple (GET) request. You open the connection, and  read the incoming data (bytes) until the connection closes. You also know the size of the response from the beginning, that's how you have a percentage.

For resuming the download request, you just do a "range" request:

    GET /download.zip HTTP/1.1 Host: example.com Range: bytes=0-1023
which skips the portion of the response you have already received.
Though only the size of the file, and the validity of the incoming bytes is verified. If the server doesn't resume correctly or the response is not the exact same, you get a corrupted file. That's why hashing is being used for serious downloads (Firmware Updates etc.).