by Ed Preston (3 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (7 Votes)
Pure visual basic implementation of the CRC32 (Fletcher) checksum algorithm. Used for detection of data corruption. In short, this class provides an algorithm for computing a unique (sort of) numeric value that represents the composition of a file. For a faster/better method see Adler32 checksum. Note, Fletcher check insensitive to some single byte changes 0 <-> 255.
Inputs
CRC32(ByVal lngCRC32 As Long, ByRef bArrayIn() As Byte, ByVal dblLength As Double) As Long
Assumes
Files size assumed to be less than 2 gig. When passing byte arrays be carefull of the file size. It is best to break the file into chunks and call CRC32 multiple times.
Download CRC32 Algorithm (5 KB)