Message98325
| Author |
mark.dickinson |
| Recipients |
cmcqueen1975, dtorp, josiahcarlson, mark.dickinson, tim.peters |
| Date |
2010年01月26日.10:56:59 |
| SpamBayes Score |
4.8692567e-05 |
| Marked as misclassified |
No |
| Message-id |
<1264503420.83.0.320339269682.issue1205239@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Interesting. I agree that that looks like a case where it would be desirable for a >> -n to do a << n.
By the way, I don't think your formula is quite correct: your crc is going to grow unboundedly as extra data bytes come in. I suspect that you want to mask the result with (1 << crc_width) - 1 after each update.
(And what's the '& 0xFF' for? Isn't it redundant?) |
|