On Mon, 10 Apr 2006, Peter Eriksen wrote: > On Sun, Apr 09, 2006 at 01:45:00PM -0400, Nicolas Pitre wrote: > ... > > Try this with the README file from the git source tree: > > > > sed s/git/GIT/g < ./README > /tmp/README.mod > > test-delta -d ./README /tmp/README.mod /tmp/README.delta > > [BOOM!] > > I found the bug. The code still has some limitations, but now > it passes the test suite. Thanks for your help, Nicolas. OK here's some more meat for you: Copy the same README file from the git source tree, then edit the copied version so the "Blob Object" section and the "Tree Object" section are swapped around like shown in the attached patch. The best delta that can be achieved is 24 bytes. With the current code the produced delta is 42 bytes. With your code the resulting delta is 4978 bytes, about twice as large as the attached patch. One major limitation of your algorithm appears to not have a global view of the base buffer before starting to find matches. Nicolas