Binary delta encoding utility.
Project description
About
Binary delta encoding utility in Python 3, using C extensions.
Based on http://www.daemonology.net/bsdiff/, with the following differences:
LZMA compression instead of BZ2 for smaller patches.
Linear patch file access pattern to allow streaming.
SA-IS instead of qsufsort for speed and reliability.
Project homepage: https://github.com/eerimoq/detools
Documentation: http://detools.readthedocs.org/en/latest
Installation
pip install detools
Statistics
To compressed is the size of To file compressed using lzma --best.
All sizes are in bytes.
From file |
To file |
From size |
To size |
Patch size |
To compressed |
---|---|---|---|---|---|
micropython v1.9.4 |
micropython v1.10 |
604872 |
615388 |
73532 |
367500 |
python 3.5 |
python 3.6 |
4464400 |
4568920 |
1493488 |
1402663 |
foo.old |
foo.new |
2780 |
2780 |
192 |
1934 |
Example usage
Command line tool
The create patch subcommand
Create a patch foo.patch from tests/files/foo.old to tests/files/foo.new.
$ detools create_patch tests/files/foo.old tests/files/foo.new foo.patch
$ ls -l foo.patch
-rw-rw-r-- 1 erik erik 192 feb 21 07:28 foo.patch
The apply patch subcommand
Apply the patch foo.patch to tests/files/foo.old to create foo.new.
$ detools apply_patch tests/files/foo.old foo.patch foo.new
$ ls -l foo.new
-rw-rw-r-- 1 erik erik 2780 feb 21 07:30 foo.new
Contributing
Fork the repository.
Implement the new feature or bug fix.
Implement test case(s) to ensure that future changes do not break legacy.
Run the tests.
make test
Create a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.