Ruby bindings to bindary diff tools bsdiff and bspatch
C Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 24 commits ahead of taf2:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ext
lib
patches
src
test
tmp
.gitignore
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
rb-bsdiff.gemspec
src.md

README.md

Ruby bindings to bsdiff and bspatch

Installation

gem install 'rb-bsdiff'

Or via Gemfile:

gem 'rb-bsdiff'

As this uses native-code extensions you will of course require a working build toolchain. Additionally, you will need the BZip2 libraries to be present on your system. On OSX they should already be present. On Linux, you may need to install relevant packages, for example:

sudo apt-get install libbz2-1.0 libbz2-dev

See http://bzip.org/ for more information.

Usage

  # Generate a patch from ext/b0 to ext/b1 as p0.
  BSDiff.diff('ext/b0', 'ext/b1', 'p0')

  # apply patch p0 to ext/b0 and produce output as b3.  b3 should be
  # identical to ext/b1.
  BSDiff.patch('ext/b0', 'b3', 'p0')

Caveats

As the underlying code only works with files, so does this API. Pass in only filenames for parameters.

License