Re: zero delta changes

"Shirish H. Phatak (Personal)" <[email protected]> Thu, 8 Mar 2007 01:27:37 -0500
Newsgroups gmane.network.librsync.general
Message-ID <003001c7614a$e071b150$a15513f0$@name>
A whole file hash is probably the way to go, though you can detect a single
copy command as Donovan has suggested, parse it and see if the length of the
copy matches the file size.

However an interesting case we have run into is appends or truncates. In
either case, we end up doing unnecessary copies when a simple write to
end/truncate the file would suffice. I have debated whether this is a
problem best solved during patch application or whether the delta generation
should incorporate new commands for "skipping" byte offsets in the source.
The former sounds more natural to me, but I was wondering if anyone had any
thoughts on optimizing these cases.

Thanks...

-Shirish

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Martin
Pool
Sent: Wednesday, March 07, 2007 9:12 PM
To: Donovan Baarda; Sujit Jagdev; [email protected]
Subject: Re: [librsync-users] zero delta changes

On 08/03/07, Donovan Baarda <[email protected]> wrote:
]> > I need to know how I can detect a zero change delta ( ie a delta that
> > signifies that no change is required)
> >
> > I am attaching some "zero change" deltas.
>
> A zero change delta consists of a "single copy" command. This command
> includes a length, so you will get different "zero delta" files for
> different length files. You also get a "single copy" command for a file
> that has been truncated, so it's not that trivial to check if the single
> copy command is really a "zero delta" or a truncation.

If I recall correctly you can ask for statistics which will tell you
there are no literal insertions, but this does not quite tell you that
there are no deletions or rearrangements.  Maybe you can get the
whole-file hash from the header?

-- 
Martin

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
librsync-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/librsync-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV