CRCs - Calculating them quickly for a File
Posted on 1997-06-20
I have written some code to Calculate the CRCs of a bunch of files.
The trouble is that I have done all the CRC calculations using binary digits held in strings so it is VERY S.L.O.W. !!
I did it this way, because it makes the code so easy to understand - but the draw back is that it is slow !
I kind of started to convert my code over to using Integers and doing everything using Bitwise operators (SHL, XOR, etc) but (after my very early benchmarks) I didn't get the speed improvement I was desperate for.
The trouble is that my CRC code needs to be finished very quickly, so I have sort of run out of time.
I need some very fast code to calculate and return the CRC for a file, which I can then call for all files in my list.
I am not too fusy about whether 16 or 32 bit CRCs are calculated, as long as the code works under 16 and 32 bit Delphi and is fast.
Can anybody help ?
I have assigned a lot of points to this question to try and get some good quick help on this.