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