Implements bubble-babble encoding/decoding
Timothy Rice c44813ce40 Initial commit | 4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
Makefile | 4 years ago | |
README.md | 4 years ago | |
bubble-babble.c | 4 years ago |
Similar to base64
, bubble babble is intended to provide human-readable encoding of arbitrary binary data.
Unlike base64
, bubble babble is intended to be pronouncable and easier to remember.
$ echo -n "" | bb
xexax
$ echo -n 1234567890 | bb
xesef-disof-gytuf-katof-movif-baxux
$ echo -n Pineapple | bb
xigak-nyryk-humil-bosek-sonax
$ echo -n 1234567890 | bb | bb -d
1234567890
$ echo -n Pineapple | bb | bb -d
Pineapple
$ dd if=/dev/urandom bs=1M count=32 status=none | tee /tmp/testing.data | bb > /tmp/bb.txt
$ md5sum /tmp/testing.data
3cc80d74a560700fe5c8f0bb81090342 /tmp/testing.data
$ bb -d < /tmp/bb.txt | md5sum
3cc80d74a560700fe5c8f0bb81090342 -
Decoding doesn't handle pipe buffering very well:
$ time ( dd if=/dev/urandom bs=1M count=32 status=none | bb | bb -d > /dev/null )
Invalid input: missing dash delimiter. (Got a 'x' with value 120 instead.)
real 0m0.092s
user 0m0.090s
sys 0m0.067s
This can be ameliorated using buffer
(which probably isn't installed by default, but will be in your package manager).
$ time ( dd if=/dev/urandom bs=1M count=32 status=none | bb | buffer | bb -d > /dev/null )
real 0m2.828s
user 0m3.170s
sys 0m3.295s