Registry / data / rdiff
library0.2.3pypypi✓ verified 86d ago

A native Python implementation of the rdiff tool by librsync, providing signature, delta, and patch operations for file synchronization. Current version 0.2.3, requires Python >=3.6. Maintained irregularly; last release in 2022.

pip install rdiff
INSTALL
IMPORT
SIG · RDIFF
R
rdiff
datapythonv0.2.3
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

signature
from rdiff import signature
delta
from rdiff import delta
patch
from rdiff import patch

Basic usage of rdiff: signature on original data, delta on new data, and patch to reconstruct the new file.

from rdiff import signature, delta, patch # Create signature from original file sig = signature(b'original data') # Compute delta between signature and new file d = delta(sig, b'new data with changes') # Apply delta to original data to get new data new_data = b'original data' patched = patch(new_data, d) print(patched)
Debug
Known issues
gotchardiff uses a custom MD4 implementation which may be slower or less tested than standard hashlib. It was introduced in v0.2.0 because hashlib's md4 is not guaranteed to be available on all platforms.
fix
No fix needed; this is internal but may affect performance.
affects: >=0.2.0
deprecatedThe rdiff library has not been updated since 2022. Be aware that it may not support newer Python versions or receive bug fixes. Consider using librsync or other alternatives for production use.
fix
Evaluate if rdiff meets your needs or switch to librsync bindings (e.g., pylibrsync).
affects: all
gotchaThe signature function expects bytes, not str. Passing a string will raise a TypeError.
fix
Always encode strings to bytes before calling signature, delta, or patch: e.g., b'data' or data.encode('utf-8').
affects: all
Errors
Common errors & fixes
TypeError: a bytes-like object is required, not 'str'
Passing a string instead of bytes to signature(), delta(), or patch().
fix
Use bytes literals (b'...') or encode your strings: data.encode('utf-8').
AttributeError: module 'rdiff' has no attribute 'signature'
Outdated version or incorrect import (e.g., installed wrong package or import path).
fix
Ensure you installed rdiff (not rdiff-backup or other packages) and use `from rdiff import signature`.
Upgrade
Version history
0.2.3latest on PyPI · released Mar 24, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rdiff — pip install rdiff · libregistry