README.chromium revision cedac228d2dd51db4b79ea1e72c7f249408ee061
1Name: BSDiff
2URL: http://www.daemonology.net/bsdiff/
3Source URL: http://www.daemonology.net/bsdiff/bsdiff-4.3.tar.gz
4Version: 4.3
5License: BSD
6License File: LICENSE
7
8Description:
9Binary diff/patch utility. There are other copies of BSDiff in the Chromium
10repository, but they're all different. The other copies are based on Mozilla's
11fork of BSDiff, which serves a different set of needs. Relative to upstream
12BSDiff, Mozilla's version removes all compression, adds a CRC-32 check of the
13original file, replaces the custom off_t encoding with signed 32-bit
14big-endian integers, and contains a total reorganization of the code. The
15version in this directory contains no Mozilla code and builds directly on the
16upstream version. It retains and enhances the compression, uses SHA1 to check
17both the original file and the patched file, uses a different off_t encoding
18more compatible with the original, and involves minimal changes to the
19original code.
20
21Theoretically, a hash of the original file should be enough to guarantee data
22integrity, but in the event of algorithmic or programming bugs or other
23unexpected conditions, a hash of the patched file provides a better guarantee.
24This implementation now checks the integrity of both the original and the
25patched files. SHA1, rather than CRC-32, is used to minimize the likelihood
26that an original file that has been intentionally tampered with will produce
27an altered patched file without being detected.
28
29Local Modifications:
30 - Added LICENSE file by copying the license block from bsdiff.c and
31   bspatch.c.
32 - The following modifications are relative to the original unpatched version,
33   checked in to the Chromium repository at r49280.
34 - Created goobsdiff.gyp for GYP build system integration.
35 - Renamed bsdiff.c to goobsdiff.c and bspatch.c to goobspatch.c.
36 - Added sha1_adapter.cc, sha1_adapter.h, and empty.cc to facilitate hashing.
37 - Added #include <sys/types.h> to goobspatch.c so that it compiles. (Oops!)
38 - Changed the magic number in the header from BSDIFF40 to BSDIFF4G.
39 - Expanded the header to include SHA1 hashes of the original and new files,
40   and added hash checks to the patcher.
41 - Expanded the header to include the lengths of the control, diff, and extra
42   blocks in the patch file, and added patch file length validation to the
43   patcher.
44 - Replaced custom off_t encoding with signed 64-bit little-endian integers.
45 - The control, diff, and extra blocks can be compressed with bzip2, gzip, or
46   xz/lzma2, or left uncompressed, independently of one another, depending on
47   which is smallest. This often results in a net reduction in patch size of
48   about 3%-5%.
49 - Error messages in the patcher are slightly more descriptive.
50 - The patcher treats a few more unexpected read cases as errors than it did
51   previously. This will theoretically cause it to exit with an error instead
52   of sitting in a busy loop or crashing when certain malformatted patch files
53   are provided.
54 - Improved sanity checks for malformed patches.
55