# bsdiff を Homebrew, apt, dnf, MacPorts, Nix, zypper でインストール

bsdiff のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:bsdiff
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install bsdiff
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bsdiff
```

  証拠: MacPorts ports tree: devel/bsdiff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install bsdiff
```

  証拠: Debian stable package indexes: bsdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install bsdiff
```

  証拠: Fedora Rawhide package metadata: bsdiff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#bsdiff
```

  証拠: nixpkgs package indexes: pkgs/by-name/bs/bsdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install bsdiff
```

  証拠: openSUSE Tumbleweed package metadata: bsdiff from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:bsdiff
- **パッケージマネージャ:** Homebrew
- **バージョン:** 4.3
- **ソース概要:** Generate and apply patches to binary files
- **ホームページ:** <https://www.daemonology.net/bsdiff/>
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- bsdiff (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 4.3
## プロジェクトの歴史と使われ方

bsdiff and bspatch are Colin Percival's binary diff and patch tools, best known for producing small patches for executable files. The package is tiny, old, and still important because binary delta updates remain a core packaging and updater trick.

### プロジェクトの歴史

The official page describes bsdiff and bspatch as tools for building and applying binary patches. It explains that they use suffix sorting, specifically Larsson and Sadakane's qsufsort, and exploit the way executable files change to make much smaller patches than contemporary binary patch tools.

The same page says the programs were originally named `bdiff` and `bpatch`, but were renamed because many other programs used those names. It published version 4.3 as a tarball and identifies the BSDiff 4 algorithm with Percival's 2003 paper, `Naive differences of executable code`.

### 採用の歴史

By the time version 4.2 was described on the official page, bsdiff was already in the FreeBSD, NetBSD, and OpenBSD ports trees, DarwinPorts, Gentoo, and as a Python extension module. The provided package facts show wider modern packaging across Homebrew, Debian, Fedora/dnf, MacPorts, Nix, Ubuntu, and openSUSE/zypper.

bsdiff also influenced the packaging and update world indirectly: binary delta algorithms of this style are natural fits for software update systems, where shaving patch size saves bandwidth and time.

### 使われ方

`bsdiff` compares an old file and a new file to produce a compact patch; `bspatch` applies that patch to reconstruct the new file. The package is most useful for compiled binaries and other files where line-oriented text diffs are ineffective.

The official page documents its resource profile: bsdiff is memory-hungry and runs in O((n+m) log n), while bspatch runs in O(n+m). That tradeoff is acceptable for many release pipelines because patch creation happens once, while patch application may happen many times.

### パッケージ好きにとっての重要性

bsdiff is package-nerd famous because it is a small command with an outsized effect on binary distribution. It gives maintainers a simple way to ship deltas instead of whole files, and its paper made the algorithm understandable enough to reimplement and adapt.

It is also a classic example of a package whose upstream is not a modern forge repository. Package managers preserve the tool through tarballs, patches, and downstream maintenance even without a canonical GitHub-style source-control home.

### タイムライン

- 2003: Colin Percival describes the BSDiff 4 algorithm in `Naive differences of executable code`.
- 2000s: Version 4.2 is available in FreeBSD, NetBSD, OpenBSD ports, DarwinPorts, Gentoo, and as a Python extension.
- 2005: Version 4.3 is published on the official daemonology.net bsdiff page.
- 2026: Provided package facts show bsdiff available across Homebrew, Debian, Fedora/dnf, MacPorts, Nix, Ubuntu, and openSUSE/zypper.

### Related projects

- bspatch is the companion patch-application utility shipped with bsdiff.
- xdelta is the comparison tool named by the official page for binary delta compression.
- RTPatch is the commercial binary patch tool named by the official page as another comparison point.
- FreeBSD Update is historically associated with Colin Percival's binary-update work and the wider bsdiff ecosystem.

### ソース

- <https://www.daemonology.net/bsdiff>
- <https://www.daemonology.net/papers/bsdiff.pdf>
- source_facts.package-manager


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- Debian apt - bsdiff - 4.3-23: normalized package name match | Debian stable package indexes: bsdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | generate/apply a patch between two binary files | https://www.daemonology.net/bsdiff
- Nix - bsdiff: normalized package name match | nixpkgs package indexes: pkgs/by-name/bs/bsdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bsdiff - 4.3-23: normalized package name match | Ubuntu 24.04 LTS package indexes: bsdiff from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | generate/apply a patch between two binary files | https://www.daemonology.net/bsdiff
- dnf - bsdiff - 4.3-40.fc45: normalized package name match | Fedora Rawhide package metadata: bsdiff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Binary diff/patch utility | http://www.daemonology.net/bsdiff/
- zypper - bsdiff - 4.3-6.11: normalized package name match | openSUSE Tumbleweed package metadata: bsdiff from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Tools for binary file patches | https://daemonology.net/bsdiff
- MacPorts - bsdiff: normalized package name match | MacPorts ports tree: devel/bsdiff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/bsdiff.yml](https://github.com/mxcl/pkgdb/blob/main/combined/bsdiff.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
