bindiff

package module
v0.0.0-...-d653a97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2014 License: MIT Imports: 3 Imported by: 4

README

bindiff

-- import "github.com/BenLubar/bindiff"

Package bindiff provides a bidirectional binary patch for pairs of []byte.

Usage

var ErrCorrupt = errors.New("bindiff: corrupt patch")

ErrCorrupt is the only possible error from functions in this package.

func Diff
func Diff(old, new []byte, granularity int) (patch []byte)

Diff computes the difference between old and new. A granularity of 1 or more combines changes with no greater than that many bytes between them.

func Forward
func Forward(old, patch []byte) (new []byte, err error)

Forward retrieves the second argument to Diff given the first argument and its output.

func Reverse
func Reverse(new, patch []byte) (old []byte, err error)

Reverse retrieves the first argument to Diff given the second argument and its output.

Documentation

Overview

Package bindiff provides a bidirectional binary patch for pairs of []byte.

Index

Constants

This section is empty.

Variables

View Source
var ErrCorrupt = errors.New("bindiff: corrupt patch")

ErrCorrupt is the only possible error from functions in this package.

Functions

func Diff

func Diff(old, new []byte, granularity int) (patch []byte)

Diff computes the difference between old and new. A granularity of 1 or more combines changes with no greater than that many bytes between them.

func Forward

func Forward(old, patch []byte) (new []byte, err error)

Forward retrieves the second argument to Diff given the first argument and its output.

func Reverse

func Reverse(new, patch []byte) (old []byte, err error)

Reverse retrieves the first argument to Diff given the second argument and its output.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL