bin-encode-decode 11.0.0

A high-performance binary encode and decode library that supports customizable character sets beyond Base64.
Documentation

bin-encode-decode

Custom-Alphabet Binary Encoding & Decoding

crates.io docs.rs Rust 2024 License: MIT

Workspace Overview · API Docs · Agent Engineering Rules


Overview

High-performance binary encoder and decoder supporting arbitrary custom character sets beyond standard Base64.

This package is part of the ctares unified Rust 2024 workspace and follows the repository's strict module purity, formatting, and dependency-ordered release standards.

Responsibilities & Module Layout

  • common — Alphabet validation, lookup tables, and error types
  • encode — Deterministic binary-to-text encoding over user-supplied alphabets
  • decode — Strict character validation and binary reconstruction

Installation & Quick Start

cargo add bin-encode-decode
use bin_encode_decode::*;

let charset: &str = "0123456789abcdef";
let encoded: String = encode(b"ctares", charset).unwrap();
let decoded: Vec<u8> = decode(&encoded, charset).unwrap();
assert_eq!(decoded, b"ctares");

Verification

Run crate-scoped formatting, lint, and test checks from the workspace root:

cargo run -p crate-cli -- fmt --check
cargo clippy -p bin-encode-decode --all-features --all-targets -- -D warnings
cargo test -p bin-encode-decode --all-features

Documentation & Governance

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.