Take a look at the details here: https://software.intel.com/en-us/blogs/2015/09/02/whats-wrong-with-my-crc
Specifically these two lines of code:
Fast CRC 16 C
myCrc ^= *buffer++; myCrc = (myCrc) ^ (myCrc << 5) ^ (myCrc << 8);
Fast CRC 16 C#
myCrc ^= (ushort)(buffer[pos]); myCrc = (ushort)((myCrc) ^ (myCrc << 5) ^ (myCrc << 8));
It looks like a very efficient CRC method, for both CPU and Memory utilization.
I can’t find anything wrong with it, so why isn’t this kind of implementation the first hit on google?
What am I missing there?
Any idea is welcome.