CRC/Checksum Computation
Which technique is comput开发者_StackOverflowationally and programmatically easier to compute the CRC of a Data polynomial ?
LSB-First or MSB-first technique ?
I would be glad, if you could provide the reason behind it as well.
The techniques would be exactly the same. The fastest option would be to calculate the CRC in the order you receive the data, that way you only need O(1)
storage.
Your CRC polynomial should take into account the endianess of the received data of course, so if you have a CRC polynomial for MSB first data, but receive bytes with LSB first, either reverse the bytes or the CRC polynomial. The fastest option here would be to reverse the CRC polynomial, since you can do that at compile time.
精彩评论