3 unstable releases
Uses new Rust 2024
| 0.2.1 | Mar 26, 2026 |
|---|---|
| 0.2.0 | Feb 6, 2026 |
| 0.1.0 | Feb 4, 2026 |
#2305 in Encoding
14KB
247 lines
Zero-dependency hex encoding and decoding.
let some_bytes = b"hello, world! here's some data!";
let encoded = smex::encode_to_string(&some_bytes);
assert_eq!(smex::decode_to_vec(encoded).expect("should be valid hex"), some_bytes);
Strings prefixed with 0x are not supported.
smex::decode_to_vec("0x68656c6c6f20776f726c6421").expect("should suport 0x prefixes");