Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

BuildStatus Coverage pypi

Fast delta encoding in python using xdelta3.

Requirements

  • Python 3.5 or 3.6 - it’s 2017, you should be using python 3.6 by now anyway.

  • linux - compilation only tested on ubuntu, might work on other platform.

Installation

pip install xdelta3

Usage

import xdelta3
value_one = b'wonderful string to demonstrate xdelta3, much of these two strings is the same.'
value_two = b'different string to demonstrate xdelta3, much of these two strings is the same.'
delta = xdelta3.encode(value_one, value_two)
# delta is an unreadable byte string: b'\xd6\xc3 ... \x01different\n\x13F\x00'

print(f'New string length: {len(value_two)}, delta length: {len(delta)}')
value_two_rebuilt = xdelta3.decode(value_one, delta)
if value_two_rebuilt == value_two:
    print('Boo Ya! Delta encoding successful.')

(with xdelta3 installed this code should run “as is”, just copy it into ipython or a file and run)

How fast?

xdelta3-python is a thin wrapper around xdelta 3.1.1 which is a highly optimised c library for delta calculation and compression. It can encode a delta and decode it again for 5 small changes in a 5.5 million character string (the complete works of shakespeare) in around 10ms (or 30ms with the highest compression level). Boom. See performance.py.

Metadata

Release files for xdelta3-accemate 0.0.6a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xdelta3-accemate 0.0.6a3
File Size Uploaded
xdelta3_accemate-0.0.6a3.tar.gz 122.4 kB Details

Release files / xdelta3_accemate-0.0.6a3.tar.gz

Download URL xdelta3_accemate-0.0.6a3.tar.gz
Size 122.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9fd228c2c686bc8ef5695b7081f49b528d469698c06dfb73be536445fb66cc44
BLAKE2b-256 checksum
How to use checksums
aaf7eacdeb3c38d37aa03808db70ad49f816299a7cac3756588e232efd2a00d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.0.6a3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page