2 unstable releases
0.2.0 | May 23, 2024 |
---|---|
0.1.0 | May 22, 2024 |
#1633 in Parser implementations
17KB
209 lines
smol - 5 bit encoding file format
what is smol? smol is a file format that compresses text into 5 bits per letter instead of the normal 8 bits. this is achived by having a charset lesser than 32 chars so all letters fits nicely into 5 bits (32 values). this makes all sort of problem such as an byte being 8 so multiple letters will overlap eachother but this is all handeled through this library for ease of use.
this is not made for any production applications only as an hobby.
lib.rs
:
smol - 5 bit encoding file format
what is smol? smol is a file format that compresses text into 5 bits per letter instead of the normal 8 bits. this is achived by having a charset lesser than 32 chars so all letters fits nicely into 5 bits (32 values). this makes all sort of problem such as an byte being 8 so multiple letters will overlap eachother but this is all handeled through this library for ease of use.
this is not made for any production applications only as an hobby.
how does this work?
this is the entire charset
" abcdefghijklmnopqrstuvwxyz.!?12"
^ space
first 30 chars are normal (space, alphabet, ! and ?)
the last two (1 and 2) have special functions which is:
(1): enters number mode - all characters read will be interpreted as their number part. [A = 1, B = 2 ... I = 9]
(2): makes the next procceding character uppercase or special action in some cases. example: newlines are formatted "2 "
see also SmolBlob
Dependencies
~160KB