diff.rb README

Diff Algorithm Implementation, Copyright (C) 2001 Lars
Christensen, [email protected].

LEGAL NOTICE

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.

ABOUT

This implementation is basically a Ruby conversion of the Perl
Algorithm::Diff module in CPAN.

Diff is an algorithm which computes the differences between two
lists a and b. The resulting set of differences can be applied to
a (also called "patching") to get b. This is also what the Unix
command line tools "diff" and "patch" are able to do.

diff.rb generates a "minimal diff". This means that the set of
changes that should be applied to a to get b can not be fewer than
those generated by diff.rb. diff.rb does not generate contextual
diffs. Therefor, the diff can only be succesfully applied to a
list exactly equal to to original a.

Documentation is in RD format in diff.rb. Ruby rd2 on it to
extract into other formats.

INSTALLATION

You should not installed this library system wide, because it is a
work in progress and the API may still change. You should place
the file "diff.rb" together with the source that needs to use it
and simply put "require 'diff'" at the top of your program file.

REVISION HISTORY

Version 0.1

    Initial release. Diff algorithm works.

Version 0.2

    Speed improvements and code clean up

Version 0.3

    Added unixdiff.rb, an implementation of Unix Diff (simple

format only)

CREDITS

Thanks to authors of Perl's Algorithm::Diff (originally written by
Mark-Jason Dominus, currently maintained by Ned Konz).