There is no "algorithm".
Look at RFC 2616, which covers HTTP/1.1, for the various range support it has; this is how a client program can tell the server to skip a number of [mega]bytes and thus "resume" the download where it left off. However, servers may ignore Range Retrieval Requests and thereby thwart/prohibit resuming downloads.
Remembering where to resume is left up to the client, but is trivially stored as a "number of bytes already downloaded" field somewhere.