base32768

Crates.iobase32768
lib.rsbase32768
version0.1.0
sourcesrc
created_at2017-06-12 04:07:04.262039
updated_at2017-06-12 04:07:04.262039
descriptionEncodes binary data to UTF-16 text
homepagehttps://github.com/Dreae/base32768-rs
repositoryhttps://github.com/Dreae/base32768-rs
max_upload_size
id18648
size2,403,156
Dreae (Dreae)

documentation

README

Base32768-rs

Base32768 is a binary encoding for encoding arbitrary binary data to UTF-16 text.

Usage

// Encoding
let data = [72u8, 101u8, 108u8, 108u8, 111u8];
let encoded = base32768::encode(&data).unwrap(); // "䩲腻㐿"

// Decoding
let mut decoded = Vec::<u8>::new();
base32768::decode(&encoded, &mut decoded).unwrap();
println!("{}", String::from_utf8(decoded).unwrap()); // Prints "Hello"

Prior Art

This module is a pretty vanilla port of the original JavaScript module to Rust.

Commit count: 7

cargo fmt