Verify file integrity Deep dive. How does it work.
Ok, I will call myself a code monkey. I know the gist, but I am not practiced.
I've always been curious on how Steam does this.
Does it go Check if X file is here. Yes. Move on.
Check if X file has letter "g" in line 4 row 24. Yes. Move on.
Does it use a hash system? file image? does it really check each character in the file to look for corruption? or some other means?
It's always been a shower thought when I use it.
I've always been curious on how Steam does this.
Does it go Check if X file is here. Yes. Move on.
Check if X file has letter "g" in line 4 row 24. Yes. Move on.
Does it use a hash system? file image? does it really check each character in the file to look for corruption? or some other means?
It's always been a shower thought when I use it.
Commentaires
Basically there's a family of formulas that turn raw data into a number. This number is called a checksum.
If a file and a duplicate file are ran through the same checksum formula and come out with the same number then those two files are most likely* the exact same. If the checksums differ, than something went wrong with the copy, and it needs to be redownloaded
*Technically you can have identical checksums even if the files aren't identical. But this is extraordinarily rare
However, the chance that 2 files with identical checksums will actually be even remotely similar to each other? That's extraordinarily rare. Now, I'm not saying it can't be done, but it's not going to happen accidentally. You'd basically need nation state levels of power to pull it off. So to check if a file hasn't been modified or corrupted, checksums are more than enough.
https://steamdb.info/blog/steam-download-system/