Command Line Interface
Documentation for the zbsdiff and zbspatch CLI tools.
zbsdiff provides two command-line utilities for BSDIFF40-compatible patches.
You can install zbsdiff binaries using Zoi:
zoi install @zillowe/zbsdiffOr install it from Crates.io:
cargo install --locked zbsdiff-clizbsdiff
Used to create a patch between a source file and a target file.
./zbsdiff <SOURCE> <TARGET> <PATCH> [OPTIONS]Options:
-P,--no-parallel: Disable parallel searching.-c <BYTES>,--chunk-size <BYTES>: Set parallel target chunk size. Values below 256 KiB are raised to 256 KiB. Cannot be combined with--no-parallel.-z <LEVEL>,--compress-level <LEVEL>: Set bzip2 compression level (0-9; default: 6).-s <BYTES>,--small-match <BYTES>: Skip exact matches no longer than this value (default: 12).-b <BYTES>,--buffer-size <BYTES>: Set delta calculation buffer size (minimum: 128).
Use - for one input or the output to use standard input or standard output.
The source and target cannot both be standard input.
zbspatch
Used to apply a patch to a source file to recreate the target file.
./zbspatch <SOURCE> <TARGET> <PATCH> [OPTIONS]Options:
-b <BYTES>,--buffer-size <BYTES>: Set write buffer size (minimum: 128).
Use - for one input or the output to use standard input or standard output.
The source and patch cannot both be standard input. Invalid patches, including
patches whose controls do not produce their declared target size, are rejected.
2026 © All Rights Reserved.
- All the content is available under CC BY-SA 4.0, expect where otherwise stated.
- Source code is available on GitLab, licensed under Apache 2.0.
Last updated on
