fastbase91-core 0.1.3

Safe, no_std basE91 binary-to-text codec; the Rust core of fastbase91
Documentation
  • Coverage
  • 90.91%
    20 out of 22 items documented2 out of 4 items with examples
  • Size
  • Source code size: 52.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 427.1 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • birdhackor/fastbase91
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • birdhackor

fastbase91

crates.io PyPI Rust CI Python CI License: MIT OR Apache-2.0

A fast basE91 binary-to-text codec: a no_std, #![forbid(unsafe_code)] Rust core (fastbase91-core) with a PyO3-based Python binding (fastbase91).

basE91 packs binary data into 91 printable ASCII characters, giving roughly 23% size overhead — noticeably tighter than base64's ~33%.

Features

  • Fast — a tight Rust core; on GIL-enabled CPython, one-shot encode()/decode() calls with inputs of at least 1 KiB release the GIL so calls can overlap.
  • Safe — #![forbid(unsafe_code)] throughout the core.
  • Portable — no_std core (optional alloc/std); runs on bare metal.
  • Streaming — incremental Encoder/Decoder for data that does not fit in memory at once.
  • Free-threaded ready — the Python extension declares gil_used = false and ships free-threaded wheels (CPython 3.14t / 3.15t).
  • Stable-ABI wheels — one abi3 wheel per platform covers GIL-enabled CPython 3.11+; free-threaded 3.14 has its own wheel, and CPython 3.15+ (regular or free-threaded) can use a combined abi3/abi3t wheel.

Install

Rust:

cargo add fastbase91-core

Python:

pip install fastbase91      # or: uv add fastbase91

Usage

Rust:

use fastbase91_core::{encode, decode, DecodeOptions};

let encoded = encode(b"hello").unwrap();  // -> b"TPwJh>A"
let decoded = decode(&encoded, DecodeOptions::default()).unwrap();
assert_eq!(decoded, b"hello");

Python:

import fastbase91

encoded = fastbase91.encode(b"hello")     # -> b"TPwJh>A"
assert fastbase91.decode(encoded) == b"hello"

Documentation

Full documentation (English / 正體中文), including usage, installation and platform compatibility, API reference, free-threading, benchmarks, and a changelog: https://birdhackor.github.io/fastbase91/

Versioning

The Rust core and the Python package are released on two independent version lines: fastbase91-core on crates.io via fastbase91-core-vX.Y.Z tags, and fastbase91 wheels on PyPI via vX.Y.Z tags. See MAINTENANCE.md for the release runbook.

License

Licensed under either of MIT or Apache-2.0 at your option.