Crate bbd_lib

Source
Expand description

Library for encoding and decoding data to/from binary representations using the Braille Patterns Unicode Block characters

See the documentation or the source for each function for doctest examples.

See also the bbd crate which provides a CLI utility.

use bbd_lib::*;

assert_eq!(encode(b"Hello\n", encode_nlbb, 0, 0), "⢄⠮⢦⢦⢾⢐");
assert_eq!(decode("⢄⠮⢦⢦⢾⢐", decode_nlbb), b"Hello\n");

Functions§

decode
Decode binary representation to bytes using the given function with optional wrapping
decode_bcd
Translate a binary representation to u8 using the bcd encoding
decode_direct
Translate a binary representation to a u8 using the direct encoding
decode_nlbb
Translate a binary representation to u8 using the nlbb encoding
decode_nlbt
Translate a binary representation to u8 using the nlbt encoding
decode_nrbb
Translate a binary representation to u8 using the nrbb encoding
decode_nrbt
Translate a binary representation to u8 using the nrbt encoding
encode
Encode bytes to binary representation using the given function with optional wrapping
encode_bcd
Translate a u8 to binary representation using the bcd encoding
encode_direct
Translate a u8 to binary representation using the direct encoding
encode_nlbb
Translate a u8 to binary representation using the nlbb encoding
encode_nlbt
Translate a u8 to binary representation using the nlbt encoding
encode_nrbb
Translate a u8 to binary representation using the nrbb encoding
encode_nrbt
Translate a u8 to binary representation using the nrbt encoding

Type Aliases§

DecodeFn
EncodeFn