Question

The Steam Client application allows one to download games purchased through the associated Steam account. A typical modern game uses quite a bit of disk space (in the order of 50-70 GB), so it is not unusual for users to download the files in several Steam sessions.

However, when resuming a download that has been stopped or paused, it resumes almost instantaneously from where it was stopped before. This indicates that no partial hashing is performed on the local machine (which would actually take a lot of time in order to hash tens of GB). How can Steam ensure the integrity of the files if it does not compute a partial hash when resuming the data transfer? Note that even when the download is interrupted due to a system failure, the process resumes almost immediately when the Steam Client is started.

Even if Steam performs a partial hash "by blocks", i.e., by hashing the last block instead of the entire file, how can it make sure that the files already on disk are indeed there, or not corrupted?

Was it helpful?

Solution

I've never tried to dissect it, but yes the Steam download management is impressive in its ability to pause/resume and even integrity check an installed app and it finds the files missing or corrupted files and fixes. But the question is not on the latter.

I'm sure they transfer a compressed archive, not file by file, and in blocks or chunks, with both client and server knowing where the transfer is so that it can resume if cutoff.

You can look into file transfer protocols and how they evolved. ZModem (https://en.wikipedia.org/wiki/ZMODEM) was the first widely used protocol to support resuming. I'd be surprised if that methodology isn't still present in modern download managers.

Licensed under: CC-BY-SA with attribution
scroll top