Crates.io | multibase |
lib.rs | multibase |
version | 0.9.1 |
source | src |
created_at | 2017-01-19 21:14:58.886776 |
updated_at | 2020-11-06 12:24:39.121601 |
description | multibase in rust |
homepage | https://github.com/multiformats/rust-multibase |
repository | https://github.com/multiformats/rust-multibase |
max_upload_size | |
id | 8137 |
size | 31,410 |
multibase implementation in Rust.
First add this to your Cargo.toml
[dependencies]
multibase = "0.9"
For no_std
[dependencies]
multibase = { version ="0.9", default-features = false }
note: This crate relies on the currently unstable host_dep
feature to compile proc macros with the proper dependencies, thus requiring nightly rustc to use.
Then run cargo build
.
use multibase::Base;
let base64 = multibase::encode(Base::Base64, b"hello world");
let (base, data) = multibase::decode(base64);
Note: base32
and base64
are orders of magnitude faster due to byte alignment. Don't
be surprised if using a different base turns into a performance bottleneck. You
were warned!
Captain: @dignifiedquire.
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2017 Friedel Ziegelmayer