Skip to content

Instantly share code, notes, and snippets.

View AudriusButkevicius's full-sized avatar

Audrius Butkevicius AudriusButkevicius

View GitHub Profile
@csabahenk
csabahenk / README.md
Created July 21, 2011 00:44
Rsync rolling sum calculation in various languages

Rsync rolling sum calculation in various languages

The programs below calculate the rsync weak sum (of block size 4096) of the last block of the data available on stdin.

The data is assumed to be at least block size big; the weak sum is calculated in a direct manner for the first block, and from that on, the sum is adjusted on each incoming byte using the "rollability" of this kind of checksum.

The primary goal was to see the performance of naive implementations; so my metrics was both performance and "how close is the code to