Skip to content

expo/bsdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

672 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bsdiff

This is a clone of Google's bsdiff from https://android.googlesource.com/platform/external/bsdiff, with only small changes to the Makefile (plus a one-line source portability shim) so it builds with a modern toolchain and on macOS. The bsdiff/bspatch sources themselves are unmodified upstream code. For the original project description and provenance, see README.chromium, README.android, and README.version.

bsdiff and bspatch are tools for building and applying patches to binary files.

Building

Requirements: a C++14 compiler and the brotli, libdivsufsort, and bzip2 libraries. On macOS, bzip2 ships with the system SDK, so only brotli and libdivsufsort need to be installed:

brew install brotli libdivsufsort
make

make builds the bsdiff and bspatch tools and the libbsdiff / libbspatch shared libraries. make test additionally builds the unit tests and requires GoogleTest (brew install googletest).

Local changes

These are the only differences from upstream:

  • Makefile: build with -std=c++14; on macOS, find the brotli/divsufsort/bzip2 headers and libraries under the Homebrew prefix and use the system linker's -install_name flag in place of GNU ld's -soname; skip the GoogleTest-dependent unit-test targets (and the .deps scan of their sources) when GoogleTest isn't installed.
  • file.cc: provide a portable TEMP_FAILURE_RETRY fallback for platforms that define it neither in <unistd.h> (glibc) nor via Android's <utils/Compat.h> (e.g. macOS).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors