Crate base_x

source ·
Expand description

§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§

Modules§

Structs§

Functions§

  • Decode an input vector using the given alphabet.
  • Encode an input vector using the given alphabet.