0

I know that files sometimes corrupted during copying, and for that reason people check them with hash sums. (MD5 or CRC32 seems to be OK for random errors).

But usually, when I read about this use case, people talk about large files. My assumption is that such corruption doesn't usually affect small files, only big ones. Is this assumption is correct?

1 Answer 1

1

Larger files have more opportunities for the corruption to occur.

Let's say that probability of a single byte becoming corrupted is 0.01% (top of the hat number, just for the purpose of this demonstration).

  • Probability of a 1 B file being error-free is 99.99% (100% - 0.01%)
  • Probability of a 100 B file being error-free is approx. 99.00% (99.99%100)
  • Probability of a 1 KiB (1024 B) file being error-free is approx. 90.27%
  • Probability of a 10 KiB file being error-free is approx. 35.91%
  • Probability of a 1 MiB (1024 KiB) file being error-free is approx. 0%

As you can see, probabilities of errors accumulate very rapidly as the size increases. That's why large files are way more likely to be corrupted. This doesn't mean that small files are not affected by corruption, though.

2
  • Thanks. Probably you know: does hash sums allow to tell if file has become corrupted due data degradation?
    – john c. j.
    Mar 11, 2019 at 14:32
  • 1
    Hashes can be used to detect if perceivable content of file has changed: for the same content, the hash is always the same, but even little changes will cause good hashes to change drastically. The cause of modification is irrelevant and not detectable by hash itself. It can be data decay, hardware malfunction, transfer error, virus or intentional modification by user, doesn't matter. If the content has changed, so did the hash.
    – gronostaj
    Mar 11, 2019 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .