Looks like I want rollsum.c/h from librsync (http://librsync.sourcefor
Main Topics
Browse All TopicsI'm looking for a rolling checksum algorithm that computes the checksum for all x-line chunks in a file (including overlapping chunks). I don't think the matching does not need to be precise but it does need to be fast.
Where do I find an algorithm like this? I know rsync uses something like this, but can I use the rolling checksum algorithm without GPL'ing my application? Where do I find an algorithm like this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Looks like I want rollsum.c/h from librsync (http://librsync.sourcefor
Well, the algoritm is explained in detail at http://samba.anu.edu.au/rs
I don't understand the algorithm well enough to make a distinction between rolling in and rolling out (the articles you linked to don't make this distinction; they assume fixed-chunk size). This difference is required if lines are of different lengths, however. Arguably I could change my use of the checksum to be byte-based instead of line-based, and arguably I can (and likely should) take the time to understand it more thoroughly. But this is one reason I was interested in librsync's implementation.
As it is, I didn't ask for an implementation but for an algorithm, which you gave me. Thanks.
Business Accounts
Answer for Membership
by: jkrPosted on 2005-09-08 at 12:10:01ID: 14847189
Check out
ync/tech_r eport/ ync/tech_r eport/node 2.html ync/tech_r eport/node 3.html
ki/Rsync will be useful. You'll find an implementation at http://rsync.samba.org/
http://samba.anu.edu.au/rs
http://samba.anu.edu.au/rs
http://samba.anu.edu.au/rs
Also, http://en.wikipedia.org/wi