Crates.io | basenc |
lib.rs | basenc |
version | |
source | src |
created_at | 2016-12-01 14:45:10.372738 |
updated_at | 2024-12-12 16:12:24.076317 |
description | Encoding and decoding of Base-N encodings, no_std compatible. |
homepage | |
repository | https://github.com/CasualX/basenc |
max_upload_size | |
id | 7428 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Pronounced "Base-En-See".
Encoding and decoding hex, base64 and base32 with support for #[no_std]
.
Encoding:
let encoded = basenc::Base64Std.encode(b"hello world");
assert_eq!(encoded, "aGVsbG8gd29ybGQ");
Decoding:
let decoded = basenc::Base64Std.decode("aGVsbG8gd29ybGQ=").unwrap();
assert_eq!(decoded, b"hello world");
std
(default) - Enable support for the standard library. This enables convenience features to encode and decode to String
and Vec<u8>
buffers.
simd-off
- Disable SIMD acceleration. The SIMD codepaths are less tested and are more likely to contain bugs.
simd-runtime
- Enable runtime detection of SIMD support. This is enabled by default and will automatically use SIMD acceleration if available.
Build with RUSTFLAGS="-C target-cpu=native"
(bash) / set RUSTFLAGS=-C target-cpu=native
(cmd) to enable compiletime detection of SIMD capabilities.
Profile and optimize for performance.
Implement SIMD accelerated algorithms for encoding and decoding.
Licensed under MIT License, see license.txt.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.