Expand description
base91le is an encoding that encode raw bytes into ascii in little-endian with 91 ascii character.
It’s more efficient than base64 that it encode 13 bytes to 16 bytes and it’s able to write training characters to hint how many bytes encoded in last 16 bytes chunk.
See KEYMAP for the characters the encoding used.
§Simple encode and decode
use base91le::{encode, decode};
assert_eq!(encode(b"hello"), "%;:w!;00~~~~~~~~");
assert_eq!(decode("BM1$A*00~~~~~~~~").unwrap(), b"world");Modules§
- read
- Provides reader that decoded bytes read from given reader
- ring
- Fixed size ring-buffer to read and write
- write
- Provides writer that write encoded string to given writer
Enums§
- Decode
Error - errors that could happen when decoding
Constants§
- KEYMAP
- keymap used by the encoding
Functions§
- decode
- decode base91le encoded string to raw bytes
- decode_
chunk - decode a 16 bytes len chunk to given buf, returns decoded len
- decode_
chunks - decode base91le encoded string to raw bytes, with already checked length
- encode
- encode all bytes into a string
- encode_
chunk - encode a 13 bytes chunk into base91le encoding