binarydist

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

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 9 Imported by: 0

README

binarydist

Package binarydist implements binary diff and patch as described on http://www.daemonology.net/bsdiff/. It reads and writes files compatible with the tools there.

This is forked from kr/binarydist, with some local modifications.

  • This package uses mendsley's modified algorithm instead of original one. Not compatible with original bsdiff/bspatch.
  • using index/suffixarray instead of qsufsort.
  • This package uses CGO binding to libbz2 instead of calling "bzip2" binary externally. (increased performance on high workload)

Documentation at http://go.pkgdoc.org/github.com/kr/binarydist.

Documentation

Overview

Package binarydist implements binary diff and patch as described on http://www.daemonology.net/bsdiff/. It reads and writes files compatible with the tools there.

Index

Constants

This section is empty.

Variables

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

Functions

func Diff

func Diff(old, new io.Reader, patch io.Writer) error

Diff computes the difference between old and new, according to the bsdiff algorithm, and writes the result to patch.

func DiffBytes

func DiffBytes(obuf, nbuf []byte, patch io.Writer) error

Diff With bytes

func Patch

func Patch(old io.Reader, new io.Writer, patch io.Reader) error

Patch applies patch to old, according to the bspatch algorithm, and writes the result to new.

Types

This section is empty.

Jump to

Keyboard shortcuts

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