https://github.com/multiformats/rust-multibase
Multibase in rust
https://github.com/multiformats/rust-multibase
crates decoding encoding ipfs multibase multiformats rust
Last synced: 5 months ago
JSON representation
Multibase in rust
- Host: GitHub
- URL: https://github.com/multiformats/rust-multibase
- Owner: multiformats
- License: other
- Created: 2017-01-18T21:41:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-28T16:04:37.000Z (5 months ago)
- Last Synced: 2025-04-28T17:23:15.308Z (5 months ago)
- Topics: crates, decoding, encoding, ipfs, multibase, multiformats, rust
- Language: Rust
- Homepage:
- Size: 85 KB
- Stars: 47
- Watchers: 14
- Forks: 20
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-multibase
[](http://ipn.io)
[](https://github.com/multiformats/multiformats)
[](https://webchat.freenode.net/?channels=%23ipfs)
[](https://github.com/RichardLitt/standard-readme)[](https://github.com/multiformats/rust-multibase/actions)
[](LICENSE)
[](https://crates.io/crates/multibase)
[](https://docs.rs/multibase)
[](https://deps.rs/repo/github/multiformats/rust-multibase)
[](https://codecov.io/gh/multiformats/rust-multibase)> [multibase](https://github.com/multiformats/multibase) implementation in Rust.
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
- [License](#license)## Install
First add this to your `Cargo.toml`
```toml
[dependencies]
multibase = "0.9"
```For `no_std`
```
[dependencies]
multibase = { version ="0.9", default-features = false }
```**note**: This crate relies on the [currently unstable](https://github.com/rust-lang/cargo/issues/7915) `host_dep` feature to [compile proc macros with the proper dependencies](https://docs.rs/data-encoding-macro/0.1.10/data_encoding_macro/), thus **requiring nightly rustc** to use.
Then run `cargo build`.
## Usage
```rust
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](https://github.com/dignifiedquire).
## Contribute
Contributions welcome. Please check out [the issues](https://github.com/multiformats/rust-multibase/issues).
Check out our [contributing document](https://github.com/multiformats/multiformats/blob/master/contributing.md) 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](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
[MIT](LICENSE) © Friedel Ziegelmayer