mirror of
https://github.com/clearlinux/bsdiff.git
synced 2026-04-28 10:53:45 +00:00
62 lines
3.1 KiB
Plaintext
62 lines
3.1 KiB
Plaintext
The README below was taken from a snapshot of the Chromium project at:
|
|
svn - Revision 122769: /trunk/src/chrome/installer/mac/third_party/bsdiff
|
|
|
|
For information specific to the fork as implemented in this project, see the
|
|
main README file.
|
|
|
|
---
|
|
|
|
Name: BSDiff
|
|
URL: http://www.daemonology.net/bsdiff/
|
|
Source URL: http://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz
|
|
Version: 4.3
|
|
License: BSD
|
|
License File: LICENSE
|
|
|
|
Description:
|
|
Binary diff/patch utility. There are other copies of BSDiff in the Chromium
|
|
repository, but they're all different. The other copies are based on Mozilla's
|
|
fork of BSDiff, which serves a different set of needs. Relative to upstream
|
|
BSDiff, Mozilla's version removes all compression, adds a CRC-32 check of the
|
|
original file, replaces the custom off_t encoding with signed 32-bit
|
|
big-endian integers, and contains a total reorganization of the code. The
|
|
version in this directory contains no Mozilla code and builds directly on the
|
|
upstream version. It retains and enhances the compression, uses SHA1 to check
|
|
both the original file and the patched file, uses a different off_t encoding
|
|
more compatible with the original, and involves minimal changes to the
|
|
original code.
|
|
|
|
Theoretically, a hash of the original file should be enough to guarantee data
|
|
integrity, but in the event of algorithmic or programming bugs or other
|
|
unexpected conditions, a hash of the patched file provides a better guarantee.
|
|
This implementation now checks the integrity of both the original and the
|
|
patched files. SHA1, rather than CRC-32, is used to minimize the likelihood
|
|
that an original file that has been intentionally tampered with will produce
|
|
an altered patched file without being detected.
|
|
|
|
Local Modifications:
|
|
- Added LICENSE file by copying the license block from bsdiff.c and
|
|
bspatch.c.
|
|
- The following modifications are relative to the original unpatched version,
|
|
checked in to the Chromium repository at r49280.
|
|
- Created goobsdiff.gyp for GYP build system integration.
|
|
- Renamed bsdiff.c to goobsdiff.c and bspatch.c to goobspatch.c.
|
|
- Added sha1_adapter.cc, sha1_adapter.h, and empty.cc to facilitate hashing.
|
|
- Added #include <sys/types.h> to goobspatch.c so that it compiles. (Oops!)
|
|
- Changed the magic number in the header from BSDIFF40 to BSDIFF4G.
|
|
- Expanded the header to include SHA1 hashes of the original and new files,
|
|
and added hash checks to the patcher.
|
|
- Expanded the header to include the lengths of the control, diff, and extra
|
|
blocks in the patch file, and added patch file length validation to the
|
|
patcher.
|
|
- Replaced custom off_t encoding with signed 64-bit little-endian integers.
|
|
- The control, diff, and extra blocks can be compressed with bzip2, gzip, or
|
|
xz/lzma2, or left uncompressed, independently of one another, depending on
|
|
which is smallest. This often results in a net reduction in patch size of
|
|
about 3%-5%.
|
|
- Error messages in the patcher are slightly more descriptive.
|
|
- The patcher treats a few more unexpected read cases as errors than it did
|
|
previously. This will theoretically cause it to exit with an error instead
|
|
of sitting in a busy loop or crashing when certain malformatted patch files
|
|
are provided.
|