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
On Fri, Oct 21, 2011 at 7:28 PM, Peter A. Friend <pafriend at octavian.org>wrote:> 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? >Search for "remainder" in generator.c and sender.c. The checksum summary mentions the number of checksums to expect, and the remainder length if the last sum in the sequence is not a full-size block. The sender makes a note of each sum's length when it is received using a simple heuristic (if this is the last sum, the sum's length is the remainder instead of the block length IIF the remainder is non-zero). When checksums are compared, a sum can only match if the sum's length is the same as the block we are trying to find. ..wayne.. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20111022/ffc2aeee/attachment.html>
Maybe Matching Threads
- Getting the missed calls using Asterisk Manager
- [Bug 1220] New: Reverse path filtering using "fib" needs better documentation
- Still having problems with xen guest boot
- Routing problem (RTNETLINK answers: Invalid argument) on multiple internet link.
- RE: 4 nic advanced routing question update