Monday, September 06, 2010

[sbxkhywl] Checksumming a stream

Create an algorithm which periodically inserts checksums into a stream, so that one knows quickly that an error has occurred and approximately where it happened.

This should be easy: periodically sample and emit (a portion of) the checksummer state.

Breaking into blocks and independently checksumming each block has the advantage that the checksummer will recover after a single bad block (maybe if the bad block can simply be discarded for some higher level reason).  But you will never know if an entire block is dropped.

Inspired by credit card numbers.  It would be nice if you didn't have to read the whole thing again.

No comments :