{"id":24050125,"url":"https://github.com/matusf/z-base-32","last_synced_at":"2025-04-22T15:45:52.401Z","repository":{"id":47683400,"uuid":"394055441","full_name":"matusf/z-base-32","owner":"matusf","description":"z-base-32: human-oriented base-32 encoding","archived":false,"fork":false,"pushed_at":"2025-04-18T22:29:30.000Z","size":87,"stargazers_count":9,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T09:14:43.716Z","etag":null,"topics":["encoding","python","rust","zbase32"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matusf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-08-08T19:40:23.000Z","updated_at":"2025-02-10T12:14:49.000Z","dependencies_parsed_at":"2023-11-21T16:44:47.930Z","dependency_job_id":"c62df759-8050-443b-8e8a-a4dd44859dad","html_url":"https://github.com/matusf/z-base-32","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matusf%2Fz-base-32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matusf%2Fz-base-32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matusf%2Fz-base-32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matusf%2Fz-base-32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matusf","download_url":"https://codeload.github.com/matusf/z-base-32/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249718093,"owners_count":21315076,"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":["encoding","python","rust","zbase32"],"created_at":"2025-01-09T01:54:50.832Z","updated_at":"2025-04-22T15:45:52.371Z","avatar_url":"https://github.com/matusf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# z-base-32\n\n![ci](https://github.com/matusf/z-base-32/actions/workflows/ci.yml/badge.svg)\n\nThe `z-base-32` is a human-oriented base-32 encoding.\n\n## Rust\n\n### Crate\n\n#### Installation\n\n```sh\ncargo add z-base-32\n```\n\n#### API\n\nThe library exposes two functions with the following signatures and an error type:\n\n```rs\npub fn encode(input: impl AsRef\u003c[u8]\u003e) -\u003e String;\n\npub fn decode(input: \u0026str) -\u003e Result\u003cVec\u003cu8\u003e, DecodeError\u003e;\n\npub struct DecodeError;\n```\n\n#### Example\n\n```rs\nuse zbase32::{encode, decode};\n\nfn main() {\n    assert_eq!(encode(b\"foo\"), \"c3zs6\".to_string());\n    assert_eq!(Ok(b\"foo\"), decode(\"c3zs6\".to_string()));\n    assert_eq!(decode(\u0026encode(b\"foo\")).unwrap(), b\"foo\")\n}\n```\n\n### CLI\n\nThis project also provides a CLI utility with a similar interface to the well-known `base64` command.\n\n#### Installation\n\nTo install `z-base-32` CLI you can build it from source or download prebuild binary from [releases](https://github.com/matusf/z-base-32/releases/latest).\n\n```console\ncargo install --features cli z-base-32\n```\n\n#### Example\n\n```console\n$ zbase32 -h\nz-base-32: human-oriented base-32 encoding\n\nUsage: zbase32 [OPTIONS] [FILE]\n\nArguments:\n  [FILE]  File to encode or decode\n\nOptions:\n  -d, --decode       Decode data\n  -w, --wrap \u003cWRAP\u003e  Wrap encoded lines after COLS character [default: 76]\n  -h, --help         Print help\n  -V, --version      Print version\n```\n\n## Python\n\n### Installation\n\nThe `z-base-32` package is published at [PyPI](https://pypi.org/project/z-base-32/). Install it using the following command:\n\n```console\npip install z-base-32\n```\n\n### Building\n\nThis crate can be compiled with the feature flag `python` in which case it produces Python bindings. To build Python wheels use [`maturin`](https://github.com/PyO3/maturin):\n\n```console\nmaturin build\n```\n\n### API\n\n```py\ndef encode(input: bytes) -\u003e str:\n\ndef decode(input: str) -\u003e bytes:\n\nclass DecodeError(Exception):\n```\n\n### Example\n\n```py\nimport zbase32\n\nassert zbase32.encode(b'foo') == 'c3zs6'\n\nassert zbase32.decode('c3zs6') == b'foo'\n\n\ntry:\n    zbase32.decode('invalid@char')\nexcept zbase32.DecodeError as e:\n    print(e)\n```\n\n## References\n\n- \u003chttps://philzimmermann.com/docs/human-oriented-base-32-encoding.txt\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatusf%2Fz-base-32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatusf%2Fz-base-32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatusf%2Fz-base-32/lists"}