✨ pyqbdiff ✨
The python binding for qbdiff
install
pip install qbdiff
Usage
from qbdiff import compute, patch, version, error
old = b"1234"
new_ = b"123456"
compute(old, new_, "diff_tmp.bin")
with open("diff_tmp.bin", "rb") as f:
diff = f.read()
patch(old, diff, "new.bin")
with open("new.bin", "rb") as f:
newf = f.read()
assert new_ == newf
- use
QBDIFF_USE_CFFIenv var to specify a backend
Public functions
QBERR_BADCKSUM: int
QBERR_BADPATCH: int
QBERR_IOERR: int
QBERR_LZMAERR: int
QBERR_NOMEM: int
QBERR_OK: int
QBERR_SAIS: int
QBERR_TRUNCPATCH: int
def version() -> str: ...
def error(code: int) -> str: ...
def compute(old: bytes, new_: bytes, diff_file: str) -> int: ...
def patch(old: bytes, patch_: bytes, new_file: str) -> int: ...
Build
Two env var is needed to build, LIB and INCLUDE. LIB is the path of liblzma.lib/liblzma.so,
and INCLUDE is the directory of lzma.h
git submodule update --init --recursive
python setup.py sdist bdist_wheel --use-cython --use-cffi
Metadata
Release files for qbdiff 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qbdiff-0.0.1.tar.gz | 476.0 kB | Without provenance | Details for qbdiff-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qbdiff-0.0.1-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details for qbdiff-0.0.1-cp310-cp310-win_amd64.whl |
Total release size: 865.6 kB
Release files / qbdiff-0.0.1.tar.gz
| Download URL | qbdiff-0.0.1.tar.gz |
|---|---|
| Size | 476.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59996d7e537dc1bcd4e17a8a6c8578cdd000947ec6a22bde8f69a9f1c17d0b2b
|
|
BLAKE2b-256 checksum How to use checksums |
b6feaadc2bf300af9f42355e3aedc3ddb6fbf2067b62d4e698c6639a7a2776ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / qbdiff-0.0.1-cp310-cp310-win_amd64.whl
| Download URL | qbdiff-0.0.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 389.7 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6432f0ef6fc7ba3e5d1cfb06cb917282f91af4ea300d43220bcacaf3d02a46b9
|
|
BLAKE2b-256 checksum How to use checksums |
d26b0da8957d9275b2c2affbe074659b7f2599f6f93220cd6863af2e23dd277a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for qbdiff 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.