Okay, imagine a situation like this; you downloaded a files, in the end you notice that the file is corrupted and you have to redownload the files again. But there are certain scenarios that even though it’s corrupted, it’s still can be executed. For example video files. But due to the file corrupt problem, there are some glitches in the video. In some cases, it’s nice to know whether our downloaded files contains error or not as soon as possible. There are many ways or tools to use to check the files integrity. This kind of tools or techniques involved the usage of cryptographic hash functions (eg: SHA1, md5) and redundancy check functions (among others). Among the most popular method been used is Cyclic Redundancy Check (CRC).
All right, we’ll look into a practical part and for that purpose I’ll use “[Shinsen-Subs]_Le_Chevalier_D’Eon_-_01_[6BD7BF33].avi” filename as an example. On a side notes, the example file is a video files (an anime to be exact) and as most fansubbers, they tend to include the CRC value at the end of their releases file name (the CRC value of that file is ‘6BD7BF33′). So basically, to check the file integrity, we will compute the CRC value of the file and compare it with the given CRC value. If it’s the same, safe to say that there are nothing wrong with the file and vice versa. For a little of howto demonstration, I will classify it into two different platform; Linux and Windows. Read More