Code Monkey home page Code Monkey logo

bsdifflib's Introduction

Binary diff/patch library (bsdifflib/bspatchlib) 1.1 merges the original Binary diff/patch utility (bsdiff/bspatch) and the Win32 port and adds a middle layer of code to make it usable as an ANSI C compliant cross-platform C/C++ library. See bsdiff.c/bspatch.c for example usage. Copyright 2010 Peter Vaskovic [email protected]

based on Binary diff/patch utility version 4.3, written by Copyright 2003-2005 Colin Percival [email protected] available at http://www.daemonology.net/bsdiff/

based on bsdiff/bspatch native Win32-Port (May 2007), written by Copyright 2007 Andreas John [email protected] available at http://sites.inka.de/tesla/others.html#bsdiff

source release includes files from libbzip2 1.0.6 (20 September 2010) Copyright 1996-2010 Julian R Seward [email protected] available at http://www.bzip.org/

error handling was inspired by GetWAD, written by Copyright 2003-2010 Hippocrates Sendoukas [email protected] available at http://getwad.keystone.gr/

The source code was formatted with Artistic Style 1.24 available at http://astyle.sourceforge.net/ using the options "-A1txjz1f".

I would like to thank Hippocrates Sendoukas for helping me out with some C related questions and giving me helpful coding suggestions in general. You can visit his site at http://hs.keystone.gr/

Changelog:

bsdifflib/bspatchlib 1.0 (26 May 2010)

    Initial release.

bsdifflib/bspatchlib 1.1 (9 November 2010)

    Included own header in source files.
    Hippocrates Sendoukas optimized the patching process to 
    take place in memory. New functions have been added to the bspatchlib
    API to make use of the optimizations for certain use cases.
    Updated libbzip2 to 1.0.6.

Quick overview from the homepage of these tools: http://www.daemonology.net/bsdiff/

Binary diff/patch utility bsdiff and bspatch are tools for building and applying patches to binary files. By using suffix sorting (specifically, Larsson and Sadakane's qsufsort) and taking advantage of how executable files change, bsdiff routinely produces binary patches 50-80% smaller than those produced by Xdelta, and 15% smaller than those produced by .RTPatch (a $2750/seat commercial patch tool).

These programs were originally named bdiff and bpatch, but the large number of other programs using those names lead to confusion; I'm not sure if the "bs" in refers to "binary software" (because bsdiff produces exceptionally small patches for executable files) or "bytewise subtraction" (which is the key to how well it performs). Feel free to offer other suggestions.

bsdiff and bspatch use bzip2; by default they assume it is in /usr/bin.

bsdiff is quite memory-hungry. It requires max(17n,9n+m)+O(1) bytes of memory, where n is the size of the old file and m is the size of the new file. bspatch requires n+m+O(1) bytes.

bsdiff runs in O((n+m) log n) time; on a 200MHz Pentium Pro, building a binary patch for a 4MB file takes about 90 seconds. bspatch runs in O(n+m) time; on the same machine, applying that patch takes about two seconds.

Providing that off_t is defined properly, bsdiff and bspatch support files of up to 2^61-1 = 2Ei-1 bytes.

bsdifflib's People

Contributors

odakab avatar petervas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.