computeDownloadProgress

fun computeDownloadProgress(received: Long, total: Long, elapsedMs: Long, startOffset: Long = 0): DownloadProgress

Pure progress/speed/ETA calc for a resumable download — no I/O, so it is unit-testable. received is the total bytes on disk (including any resumed startOffset); elapsedMs is time since THIS session started, so speed reflects the live transfer, not the resumed head start.