{"id":16217239,"url":"https://github.com/synodriver/pyqbdiff","last_synced_at":"2025-06-22T18:37:03.387Z","repository":{"id":200136345,"uuid":"705229508","full_name":"synodriver/pyqbdiff","owner":"synodriver","description":"python binding for qbdiff","archived":false,"fork":false,"pushed_at":"2024-10-26T04:43:58.000Z","size":399,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T09:49:47.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synodriver.png","metadata":{"files":{"readme":"README.markdown","changelog":"changename.py","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-15T12:32:49.000Z","updated_at":"2025-01-29T06:37:34.000Z","dependencies_parsed_at":"2024-03-27T14:54:49.374Z","dependency_job_id":"51e7ed73-4edc-4e09-a700-3d2b6283cd52","html_url":"https://github.com/synodriver/pyqbdiff","commit_stats":null,"previous_names":["synodriver/pyqbdiff"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synodriver/pyqbdiff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyqbdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyqbdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyqbdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyqbdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synodriver","download_url":"https://codeload.github.com/synodriver/pyqbdiff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fpyqbdiff/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261344644,"owners_count":23144905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T11:26:14.291Z","updated_at":"2025-06-22T18:36:58.368Z","avatar_url":"https://github.com/synodriver.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ci\u003e✨ pyqbdiff ✨ \u003c/i\u003e\u003c/h1\u003e\n\n\u003ch3 align=\"center\"\u003eThe python binding for \u003ca href=\"https://github.com/kspalaiologos/qbdiff\"\u003eqbdiff\u003c/a\u003e\u003c/h3\u003e\n\n[![pypi](https://img.shields.io/pypi/v/qbdiff.svg)](https://pypi.org/project/qbdiff/)\n![python](https://img.shields.io/pypi/pyversions/qbdiff)\n![implementation](https://img.shields.io/pypi/implementation/qbdiff)\n![wheel](https://img.shields.io/pypi/wheel/qbdiff)\n![license](https://img.shields.io/github/license/synodriver/pyqbdiff.svg)\n![action](https://img.shields.io/github/workflow/status/synodriver/pyqbdiff/build%20wheel)\n\n### install\n```bash\npip install qbdiff\n```\n\n\n### Usage\n```python\nfrom qbdiff import compute, patch, version, error\n\nold = b\"1234\"\nnew_ = b\"123456\"\ncompute(old, new_, \"diff_tmp.bin\")\nwith open(\"diff_tmp.bin\", \"rb\") as f:\n    diff = f.read()\npatch(old, diff, \"new.bin\")\nwith open(\"new.bin\", \"rb\") as f:\n    newf = f.read()\nassert new_ == newf\n\n```\n- use ```QBDIFF_USE_CFFI``` env var to specify a backend\n\n### Public functions\n```python\nQBERR_BADCKSUM: int\nQBERR_BADPATCH: int\nQBERR_IOERR: int\nQBERR_LZMAERR: int\nQBERR_NOMEM: int\nQBERR_OK: int\nQBERR_SAIS: int\nQBERR_TRUNCPATCH: int\n\ndef version() -\u003e str: ...\ndef error(code: int) -\u003e str: ...\ndef compute(old: bytes, new_: bytes, diff_file: str) -\u003e int: ...\ndef patch(old: bytes, patch_: bytes, new_file: str) -\u003e int: ...\n```\n\n### Build\nTwo env var is needed to build, ```LIB``` and ```INCLUDE```. ```LIB``` is the path of liblzma.lib/liblzma.so,\nand ```INCLUDE``` is the directory of ```lzma.h```\n\n```bash\ngit submodule update --init --recursive\npython setup.py sdist bdist_wheel --use-cython --use-cffi\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Fpyqbdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynodriver%2Fpyqbdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Fpyqbdiff/lists"}