bsdiff算法的java实现
网址:https://github.com/malensek/jbsdiff
Java implementation of bsdiff http://sigpipe.io/jbsdiff。
jbsdiff
A Java implementation of bsdiff (http://www.daemonology.net/bsdiff/)
Usage
jbsdiff can be used from its command line interface:
java -jar jbsdiff.jar command oldfile newfile patchfile
Where command is either 'diff' or 'patch.' You can also specify the compression algorithm used during a diff operation by setting a system property:
java -Djbsdiff.compressor=gz -jar jbsdiff.jar diff a.bin b.bin patch.gz
Supported compression algorithms (from the Apache Commons Compress library) are bzip2 (the default), gz, pack200, and xz.
...but jbsdiff is mostly intended to be used as a library. See the ui package for usage examples.
Bsdiff的技术介绍:
bsdiff and bspatch use bzip2; by default they assume it is in /usr/bin.
bsdiff is quite memory-hungry. It requires max(17*n,9*n+m)+O(1) bytes of memory, where n is the size of the old file and m is the size of the new file. bspatch requires n+m+O(1) bytes.
bsdiff runs in O((n+m) log n) time; on a 200MHz Pentium Pro, building a binary patch for a 4MB file takes about 90 seconds.bspatch runs in O(n+m) time; on the same machine, applying that patch takes about two seconds.
更多推荐


所有评论(0)