public static class RSync.RollingChecksum extends Object
https://github.com/epeli/rollsum/blob/master/ref/adler32.py http://stackoverflow.com/questions/9699315/differences-in-calculation-of-adler32-rolling-checksum-python http://de.wikipedia.org/wiki/Adler-32 http://developer.classpath.org/doc/java/util/zip/Adler32-source.html
| Constructor and Description |
|---|
RSync.RollingChecksum() |
| Modifier and Type | Method and Description |
|---|---|
RSync.RollingChecksum |
reset()
Resets the checksum to its initial state 1.
|
RSync.RollingChecksum |
update(byte[] array,
int offset,
int length)
Iterates over the array and calculates a variation of Adler.
|
RSync.RollingChecksum |
updateRolling(byte[] array)
Slide the window of the array by 1.
|
int |
value() |
RSync.RollingChecksum |
value(int checksum)
Sets the checksum to this value.
|
public RSync.RollingChecksum reset()
public RSync.RollingChecksum update(byte[] array, int offset, int length)
array - The array for the checksum calculationoffset - The offset of the arraylength - The length of the data to iterate over (the length of the
sliding window). Once this is set,
updateRolling(byte[]) will use the same valuepublic int value()
public RSync.RollingChecksum value(int checksum)
checksum - The checksum to setpublic RSync.RollingChecksum updateRolling(byte[] array)
array - The array for the checksum calculationoffset - The offset of the arrayCopyright © 2015. All rights reserved.