---
name: "bsdiff"
section: "1"
platform: "linux"
package: "bsdiff"
version: "4.3-23"
release: "Debian 13 (Trixie)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/bsdiff"
---

# bsdiff(1)

generate a patch between two binary files

## NAME

**bsdiff** – generate a patch between two binary files

## SYNOPSIS

**bsdiff** ⟨*oldfile*⟩ ⟨*newfile*⟩ ⟨*patchfile*⟩

## DESCRIPTION

**bsdiff** compares ⟨*oldfile*⟩ to ⟨*newfile*⟩ and writes to ⟨*patchfile*⟩ a binary patch suitable for use by [bspatch(1)](/bspatch/1.md). When ⟨*oldfile*⟩ and ⟨*newfile*⟩ are two versions of an executable program, the patches produced are on average a factor of five smaller than those produced by any other binary patch tool known to the author.

**bsdiff** uses memory equal to 17 times the size of  ⟨*oldfile*⟩, and requires an absolute minimum working set size of 8 times the size of oldfile.

## SEE ALSO

[bspatch(1)](/bspatch/1.md)

## AUTHORS

Colin Percival ⟨cperciva@freebsd.org⟩
