PROJET AUTOBLOG


BohwaZ

Site original : BohwaZ

⇐ retour index

Bubble Babble CLI encoder / decoder

samedi 24 janvier 2015 à 03:16

At my own surprise there is no CLI tool to encode or decode a string to and from the Bubble Babble binary encoding. That's a shame as this encoding would be much more useful than Base64 for exchanging binary data orally or on paper.

So here is one quick PHP script based on my own PHP5 BubbleBabble library to do that: bubblebabble.php

Usage is pretty simple:

$ bubblebabble.php hello.txt
xifok-mirid-bodik-nemyg-temyl-dipyd-cedyx

$ bubblebabble.php -d - <<< xifok-mirid-bodik-nemyg-temyl-dipyd-cedyx
Oh, Hi Mark!

$ fortune | bubblebabble - > encoded.txt

$ bubblebabble -d encoded.txt 
Big book, big bore.
		-- Callimachus