| Crates.io | bin-encode-decode |
| lib.rs | bin-encode-decode |
| version | 1.1.23 |
| created_at | 2025-02-20 01:05:37.476734+00 |
| updated_at | 2025-09-08 03:42:03.273788+00 |
| description | A high-performance binary encode and decode library that supports customizable character sets beyond Base64. |
| homepage | |
| repository | https://github.com/crates-dev/bin-encode-decode |
| max_upload_size | |
| id | 1562050 |
| size | 26,813 |
A high-performance binary encode and decode library that supports customizable character sets beyond Base64.
To install bin-encode-decode run cmd:
cargo add bin-encode-decode
use bin_encode_decode::*;
let mut en_decode: Charset<'_> = Charset::new();
let test_str: &str = "test";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
en_decode.charset(&charset);
let encode: Result<String, EncodeError> = en_decode.encode(test_str);
use bin_encode_decode::*;
let test_str: &str = "test";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
let encode: Result<String, EncodeError> = Encode::execute(&charset, test_str);
use bin_encode_decode::*;
let mut en_decode: Charset<'_> = Charset::new();
let test_str: &str = "aab0aabLaabZaab0";
let mut charset: String = String::from("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=");
en_decode.charset(&charset);
let decode: Result<String, DecodeError> = en_decode.decode(test_str);
use bin_encode_decode::*;
let charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=";
let encoded_str = "aab0aabLaabZaab0";
let decoded_str = Decode::execute(charset, encoded_str);
let charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_=";
let original_str = "test";
let encoded_str = Encode::execute(charset, original_str);
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
For any inquiries, please reach out to the author at root@ltpp.vip.