开发者

CRC/Checksum Computation

开发者 https://www.devze.com 2023-02-14 08:39 出处:网络
Which technique is comput开发者_StackOverflowationally and programmatically easier to compute the CRC of a Data polynomial ?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消