Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Error in rolling checksum computation #620

Open
X-Ryl669 opened this issue Dec 8, 2017 · 0 comments
Open

Error in rolling checksum computation #620

X-Ryl669 opened this issue Dec 8, 2017 · 0 comments

Comments

@X-Ryl669
Copy link

X-Ryl669 commented Dec 8, 2017

The rolling checksum property for Adler32 is:

A(n+1) = A(n) - A(1)
B(n+1) = B(n) - n*A(1) - 1

The code does not subtract 1, thus gives wrong output:

Please notice that is only applies after the rolling window is full (thus, for n < 48 in this code, the computation of B(n+1) is B(n) - n*A(1)) .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant