https://github.com/qvecs/qbase58
🔩 A quick base58 encoder/decoder implementation written in C, with Python bindings.
https://github.com/qvecs/qbase58
base58 c python
Last synced: 2 days ago
JSON representation
🔩 A quick base58 encoder/decoder implementation written in C, with Python bindings.
- Host: GitHub
- URL: https://github.com/qvecs/qbase58
- Owner: qvecs
- License: mit
- Created: 2025-01-11T18:50:08.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-09T14:13:52.000Z (8 months ago)
- Last Synced: 2025-07-22T17:59:40.482Z (3 months ago)
- Topics: base58, c, python
- Language: C
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔩 Quick Base58 _(qbase58)_
A quick base58 encoder/decoder implementation written in C, with Python bindings.
## Install
```
pip install qbase58
```## Usage
```python
import qbase58string = b"Hello, World!"
encoded = qbase58.encode(string)
print(f"Encoded: {encoded}")decoded = qbase58.decode(encoded)
print(f"Decoded: {decoded}")
```## Benchmark
Comparing with the two other Python base58 libraries:
* [base58](https://pypi.org/project/base58/)
* [based58](https://pypi.org/project/based58/)```bash
--- Data Set: SMALL (size=100 bytes) ---
base58 => avg: 45.1845 ms (std: 2.7698 ms) over 1000 iterations
based58 => avg: 12.7324 ms (std: 0.1445 ms) over 1000 iterations
qbase58 => avg: 6.5189 ms (std: 0.0414 ms) over 1000 iterations--- Data Set: MEDIUM (size=1000 bytes) ---
base58 => avg: 763.2404 ms (std: 3.9402 ms) over 500 iterations
based58 => avg: 646.2393 ms (std: 2.4316 ms) over 500 iterations
qbase58 => avg: 320.7714 ms (std: 1.1277 ms) over 500 iterations--- Data Set: LARGE (size=5000 bytes) ---
base58 => avg: 319.6193 ms (std: 1.5274 ms) over 10 iterations
based58 => avg: 320.4021 ms (std: 1.2545 ms) over 10 iterations
qbase58 => avg: 162.0134 ms (std: 0.7824 ms) over 10 iterations
```See `scripts/benchmark.py` for benchmarking details.