git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: diff'ing files ...

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 10, 2011, 13:12 UTC
Message-ID
<m34o3xesqn.fsf@localhost.localdomain>
In-Reply-To
<alpine.LFD.2.00.1106092145390.2142@xanadu.home>
Nicolas Pitre <nico@fluxnic.net> writes:
Show 6 quoted lines
> On Tue, 7 Jun 2011, Jeff King wrote:
> > On Tue, Jun 07, 2011 at 10:12:35PM +0000, Albretch Mueller wrote:
> > 
> > > > ... binary diffs, though I don't know offhand the details of the algorithm.
> > > ~
> > >  this is the part that I need ;-)
[...]
Show 20 quoted lines
> > According to the xdiff page linked:
> > 
> >   For binary files, LibXDiff implements both (with some modification)
> >   the algorithm described in File System Support for Delta Compression
> >   by Joshua P.  MacDonald, and the algorithm described in Fingerprinting
> >   By Random Polynomials by Michael O. Rabin.
> > 
> > Nicolas (cc'd) might be able to say what, if any, substantive changes
> > were made from those works.
> 
> The libxdiff code was pretty generic so to be highly portable and usable 
> for many application types.  What I did is to get rid of everything that 
> git strictly didn't need in order to make the code as simple as 
> possible, and most importantly as fast as possible. [...]
> 
> And then further modifications were made to avoid pathological corner 
> cases which were taking too much time for little gain in the Git 
> context.
> 
> I also changed the output encoding to make it tighter.

Nicolas, do you know how binary diff used by git compares with respect to performance and compression with other binary diff algorithms:

  * original LibXDiff
  * bsdiff
  * xdelta (vcdif algorithm)
  * vbindiff
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Nicolas PitreNext: Nicolas Pitre
Message 6 of 8 in “diff'ing files ...”
  1. Albretch MuellerJun 6, 2011
  2. Jeff KingJun 6, 2011
  3. Albretch MuellerJun 7, 2011
  4. Jeff KingJun 7, 2011
  5. Nicolas PitreJun 10, 2011
  6. Jakub NarebskiJun 10, 2011
  7. Nicolas PitreJun 10, 2011
  8. Albretch MuellerJun 12, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.