Expand description
This crate is for encoding and decoding KittenMoji, a base 256 binary-to-text encoding inspired by the Kitten Small Web development kit.
Β§Examples
Β§Encode and decode
use kittenmoji::{encode_slice, decode_str};
let kitten_encoded = encode_slice(b"kitten");
assert_eq!(kitten_encoded, "π§¬ππΊπΊππ");
let kitten_decoded = decode_str("π§¬ππΊπΊππ").unwrap();
assert_eq!(kitten_decoded, b"kitten");
StructsΒ§
- Decode
Error - This error is returned when decoding failed because the given code point is not one of the 256 KittenMoji emojis and thus cannot be decoded.
FunctionsΒ§
- decode
- Returns an iterator that decodes the kittenmoji input.
- decode_
str - Decodes a kittenmoji string
- decode_
stream - Reads kittenmoji strings from the (utf-8) input and writes the decoded bytes to the output
- encode
- Returns an iterator that encodes all input bytes as kittenmoji
- encode_
slice - Encodes a byte slice as kittenmoji
- encode_
stream - Reads bytes from the input and writes them as utf-8 encoded kittenmoji to output