Thanks, I may have missed part of the might powers lurking under the
hood.... But it seemed to me it's merely adding the bytes from the string
into an accumulator. That does not catch swapped bytes, additional 00's or
other damage. It may be perfect for bits dropping out of a network packet
though.

The neat thing about adler32 is that it has a fairly cheap way to detect
more damage. It's basically two 16-bit numbers where one is the sum of all
bytes like CKSM computes, and the other is the sum over all intermediate
values from the first. This does detect swapping of bytes etc.

Rob


On 2 June 2014 17:25, John Gilmore <jwgli...@gmail.com> wrote:

> The single millicoded z/Architecture machine instruction CHECKSUM,
> CKSM, documented on page 7-45 of the current PrOp, would have been a
> much better choice than your loop; but it would not, of course, have
> been nearly so much fun.
>
> John Gilmore, Ashland, MA 01721 - USA
>

Reply via email to