Greetings,

I have been using the rsync C source as a guide for porting the rsync algorithm to Java. This has been successful, but there is one low level detail I am having some issues with.

Assuming the default block size of 700 bytes, when stepping through the file and generating checksums for each block it is very likely that there will be a partial block at the end of the file. Right now I am just generating a checksum for that block and including it in the signature. There will end up being a match for this block if the source file has the same partial block at the very end of the file, but it won't match anywhere else in the file. If I don't generate a checksum for the partial block then it will never match even when present at the end of the source file, which increases the size of the patch file.

I've read the thesis and the source again, and it looks like rsync is generating a signature on the final partial block. Would someone be able to confirm this, and is rsync handling this as I describe?

Many thanks in advance,

Peter
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to