base256_lib 1.0.0

Base256 encoder/decoder
Documentation
  • Coverage
  • 80%
    4 out of 5 items documented4 out of 4 items with examples
  • Size
  • Source code size: 19.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • bitlab-experiments/base256_rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nsonanh

base256_rs

Base 256 encoder/decoder for Rust

Installation

$ cargo add base256_lib

Usage

From uint8 array to base256 string:

use base256_lib::{u82base256};
...
let bytes: &[u8] = b"Hello, World!";
let result = u82base256(bytes);

println!("result: {}", result); // should prints "ĨŅŌŌŏČĀķŏŒŌńā"

From base256 string to uint8 array:

use base256_lib::{base2562u8};
...
let input: &str = "ĨŅŌŌŏČĀķŏŒŌńā";
let result = base2562u8(input);

let result_str = match str::from_utf8(&result) {
  Ok(v) => v,
  Err(e) => panic!("Invalid UTF-8 sequence: {}", e),
};
println!("result: {}", result_str); // should prints "Hello, World!"

Charset

Charset used :

àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉ=_-`~|[]{}ƞ?,()^*$%!#.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

License

MIT or Apache License 2.0 (at your option).