From: "Zed A. Shaw" Date: 2005-10-30T01:48:31+09:00 Subject: Re: [ANN] gdiff / gpatch 0.0.1 released Hey Brian, Cool stuff. I swear someday I have to get back into the fastcst thing. I just have so much crap to do it's killing me. Let me know if you run into any bugs in the suffix array delta library. Zed On Sat, 29 Oct 2005 19:27:47 +0900 Brian Schr�der wrote: > Hello rubyists, > > I released a new cleaned up version of the gdiff / gpatch library and > programs. Now available as a gem and in setup.rb format. > > Find it at > > http://ruby.brian-schroeder.de/gdiff/ > > Installation: > > wget > http://ruby.brian-schroeder.de/gdiff/releases/gdiff-0.0.1.tar.bz2 tar > -xvvjf gdiff-0.0.1.tar.bz2 cd gdiff-0.0.1 > ruby setup.rb > > Usage: > > gdiff file_a file_b > patch > gpatch file_a patch > file_b_from_patch > > or as a library: > > require 'gdiff' > > File.open("patch", "wb") do | patch | > patch << Diff::GDiff.diff(File.read("file_a"), File.read > ("file_b")).pack end > > File.open("file_b_from_patch", "wb") do | file_b_2 | > file_b_2 << > Diff::GDiff.unpack(File.read("patch")).apply_to(File.read("file_a")) > end > > regard, > > Brian > > > -- > http://ruby.brian-schroeder.de/ > > Stringed instrument chords: http://chordlist.brian-schroeder.de/ >