[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: vdelta

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-01-09 07:03:27 CET

Hi. I can't really help with your exception, but I can give you a
little road map of the vdelta code in Subversion. All of the relevant
files are from libsvn_delta.

In text_delta.c, you'll find the overarching logic. apply_window() is
particularly of interest for how the windowing is handled, and
apply_instructions() shows how a delta is applied once it has been
decoded from svndiff format into memory format.

In vdelta.c, you can find the core logic of the vdelta algorithm, which
takes two blocks of bytes and computes a delta between them. It's
pretty well documented. svn_txdelta_vdelta() is the entry point, but
the work is done by vdelta(); svn_txdelta_vdelta just initializes the
hash table and calls vdelta() once for the source data and once for the
destination data.

In svndiff.c, you can find the code to marshal memory-format deltas into
byte streams and vice versa.

All of this code is written to a fairly subversion-specific coding
standard, but vdelta.c in particular could be lifted into a standard C
program with a minimum of bashing.

There is also an implementation of the vdelta algorithm from AT&T at
www.research.att.com/sw/tools (look under "VCODEX"). I've only looked
at it briefly; I haven't verified that we're implementing the same
algorithm as they are (hopefully we are). They use a different and more
sophisticated byte stream format for the deltas (called "vcdiff"), which
seemed like overkill for us.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:55 2006

This is an archived mail posted to the Subversion Dev mailing list.