Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: othersrc/external/bsd/binpatch



Module Name:    othersrc
Committed By:   agc
Date:           Fri Jan 11 06:27:01 UTC 2013

Update of /cvsroot/othersrc/external/bsd/binpatch
In directory ivanova.netbsd.org:/tmp/cvs-serv26282

Log Message:
Import a binary patch library, libbinpatch(3), and program,
binpatch(1), into the othersrc repository.  This can be used to encode
a binary patch file from an original file, and a new file.  To do
this, 3 separate "instructions" are used, similar to those outlined in
RFC 3284 -

        + add - addition of new data
        + copy - copying of data from original file
        + run - a run of characters, similar to memset(3)

The binary patches generated here are a much simplified form of those
described in the RFC, but have 64bit offsets and 32bit sizes in the
instructions.  The generated binary patch files are also much smaller
than the original files, and even standard diffs, and are only just
larger then the equivalent vcdiff binary patch file.

        % diff f1 f2 | wc
              58     338    1969
        % diff -u f1 f2 | wc 
              85     408    2530
        % binpatch -e f1 f2 | wc
              44     269    1801
        % vcdiff encode -dictionary f1 -target f2 | wc
              40     257    1663

(The last is the Google vcdiff program found in pkgsrc/devel/open-vcdiff)

The binpatch(1) program can be used to generate binary patch files,
and to reconstruct the target files, in the following way

        % binpatch -e -o patch f1 f2
        % binpatch -f f1 -o recon patch
        % diff f2 recon
        % rm -f recon
        % binpatch -v -f f1 -o recon patch
        Add  1337 bytes
        Copy 187 bytes from 0
        Copy 386 bytes from 198
        Add  50 bytes
        Copy 173 bytes from 592
        Add  55 bytes
        Copy 373 bytes from 816
        Add  74 bytes
        Copy 34 bytes from 1189
        Add  182 bytes
        Copy 23 bytes from 1262
        diff f2 recon
        % diff f2 recon
        % rm -f recon

binpatch(1) uses libbinpatch(3) and libnetdiff(3) to encode binary
patch files, and libbinpatch(3) to decode binary patch files.

Status:

Vendor Tag:     CROOKS
Release Tags:   binpatch-base
                
N othersrc/external/bsd/binpatch/Makefile
N othersrc/external/bsd/binpatch/bin/007.expected
N othersrc/external/bsd/binpatch/bin/Makefile
N othersrc/external/bsd/binpatch/bin/f1
N othersrc/external/bsd/binpatch/bin/f2
N othersrc/external/bsd/binpatch/dist/Makefile
N othersrc/external/bsd/binpatch/dist/binpatch.c
N othersrc/external/bsd/binpatch/dist/binpatch.h
N othersrc/external/bsd/binpatch/dist/main.c
N othersrc/external/bsd/binpatch/dist/libbinpatch.3
N othersrc/external/bsd/binpatch/dist/binpatch.1
N othersrc/external/bsd/binpatch/lib/Makefile
N othersrc/external/bsd/binpatch/lib/shlib_version

No conflicts created by this import




Home | Main Index | Thread Index | Old Index