I am analyzing https://github.com/baixiangcpp/FileCDC
it explained to me, that each found block has the same last bits of fingerprint (nice trick!). In this example we check last 13 bits, that minimal block is about 8 kiB, but blocks can be larger because not always stop when 13 bits is equal some value.
:
Code:
while (cur < tail) {
fingerprint = (cur == block_min_sz - 1) ?
finger(buf + cur - BLOCK_WIN_SZ + 1, BLOCK_WIN_SZ) :
rolling_finger (fingerprint, BLOCK_WIN_SZ,
*(buf+cur-BLOCK_WIN_SZ), *(buf + cur));
BLOCK_WIN_SZ to 48,
I don't understand, that in gear hash computing are added bytes to hash but not computing bytes leaving window