[][src]Crate base_x

base_x

Encode and decode any base alphabet.

Installation

Add this to Cargo.toml file:

[dependencies]
base-x = "0.2.0"

Usage

extern crate base_x;

fn main() {
  let decoded = base_x::decode("01", "11111111000000001111111100000000").unwrap();
  let encoded = base_x::encode("01", &decoded);
 assert_eq!(encoded, "11111111000000001111111100000000");
}

Re-exports

pub use decoder::AsciiDecoder;
pub use decoder::Utf8Decoder;
pub use encoder::AsciiEncoder;
pub use encoder::Utf8Encoder;
pub use alphabet::Alphabet;

Modules

alphabet
decoder
encoder

Structs

DecodeError

Functions

decode

Decode an input vector using the given alphabet.

encode

Encode an input vector using the given alphabet.