This might be useful to someone - and perhaps there's a better way??
I knocked this out a while back because I needed to calculate a reliable CRC32. I got the algorithm from somewhere online but I've since lost the link
I wrote it as a class (but it can easily be converted to a code module). Just initialize the class and then call Calc() - passing in the byte array. It will return an INT which is the CRC32.
Note: the code is quick when run in Release but in Debug it can run quite slow (depending on the size of the array that the CRC32 is being calculated for)
I should also mention that this works equally as well with B4A - not sure about B4i/R as yet. Maybe someone could comment if it works ok for those two IDEs

I knocked this out a while back because I needed to calculate a reliable CRC32. I got the algorithm from somewhere online but I've since lost the link
I wrote it as a class (but it can easily be converted to a code module). Just initialize the class and then call Calc() - passing in the byte array. It will return an INT which is the CRC32.
Note: the code is quick when run in Release but in Debug it can run quite slow (depending on the size of the array that the CRC32 is being calculated for)
I should also mention that this works equally as well with B4A - not sure about B4i/R as yet. Maybe someone could comment if it works ok for those two IDEs
Attachments
Last edited: