9 releases (breaking)

0.9.1 Nov 6, 2020
0.8.0 Feb 23, 2020
0.6.0 Feb 8, 2017

#49 in Encoding

Download history 61169/week @ 2023-12-17 35121/week @ 2023-12-24 49551/week @ 2023-12-31 68246/week @ 2024-01-07 77262/week @ 2024-01-14 76846/week @ 2024-01-21 82280/week @ 2024-01-28 89615/week @ 2024-02-04 88989/week @ 2024-02-11 94956/week @ 2024-02-18 93378/week @ 2024-02-25 88573/week @ 2024-03-03 84498/week @ 2024-03-10 85827/week @ 2024-03-17 86815/week @ 2024-03-24 98303/week @ 2024-03-31

360,769 downloads per month
Used in 743 crates (69 directly)

MIT license

22KB
275 lines

rust-multibase

Build Status License Crates.io Documentation Dependency Status Coverage Status

multibase implementation in Rust.

Table of Contents

Install

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.

Usage

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!

Maintainers

Captain: @dignifiedquire.

Contribute

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.

License

MIT © 2017 Friedel Ziegelmayer

Dependencies

~1.5MB
~34K SLoC