Skip to content

Encode binary data as emojis! 0xCAFECAFE -> ๐Ÿ’‹๐Ÿ’ฟ๐Ÿ’‹๐Ÿ’ฟ.

Notifications You must be signed in to change notification settings

timruffles/base-lol

Repository files navigation

base-lol(1)

Encodes/decodes binary data as a sequence of emojis.

Efficiency (Lack of)

Encodes every byte as an emoji in utf8, so 32 bits! 25% efficient.

Demo

Requires node >= 10.

Binary file

node base-lol.mjs < targets/max.jpg > max.base-lol
node base-lol.mjs --decode < max.base-lol > max-decoded.jpg
diff targets/max.jpg max-decoded.jpg

Something readable:

ฦ’ cat targets/smiley.svg
<svg xmlns="http://www.w3.org/2000/svg"><circle fill="#FF0" cx="6" cy="6" r="6"/><circle cx="3" cy="4" r="1"/><circle cx="7" cy="4" r="1"/><path d="M2,6 C2,6 3,12 8,6"/></svg>
ฦ’ node dist/base-lol.js < targets/smiley.svg
๐Ÿผ๐Ÿ˜ฒ๐Ÿ˜ต๐Ÿ˜ฆ๐Ÿ ๐Ÿ˜ท๐Ÿ˜ฌ๐Ÿ˜ซ๐Ÿ˜ญ๐Ÿ˜ฒ๐Ÿฝ๐Ÿข๐Ÿ˜ง๐Ÿ˜ณ๐Ÿ˜ณ๐Ÿ˜ฏ๐Ÿบ๐Ÿฏ๐Ÿฏ๐Ÿ˜ถ๐Ÿ˜ถ๐Ÿ˜ถ๐Ÿฎ๐Ÿ˜ถ๐Ÿณ๐Ÿฎ๐Ÿ˜ฎ๐Ÿ˜ฑ๐Ÿ˜ฆ๐Ÿฏ๐Ÿฒ๐Ÿฐ๐Ÿฐ๐Ÿฐ๐Ÿฏ๐Ÿ˜ฒ๐Ÿ˜ต๐Ÿ˜ฆ๐Ÿข๐Ÿพ๐Ÿผ๐Ÿ˜ข๐Ÿ˜จ๐Ÿ˜ฑ๐Ÿ˜ข๐Ÿ˜ซ๐Ÿ˜ค๐Ÿ ๐Ÿ˜ฅ๐Ÿ˜จ๐Ÿ˜ซ๐Ÿ˜ซ๐Ÿฝ๐Ÿข๐Ÿฃ๐Ÿ˜…๐Ÿ˜…๐Ÿฐ๐Ÿข๐Ÿ ๐Ÿ˜ข๐Ÿ˜ท๐Ÿฝ๐Ÿข๐Ÿถ๐Ÿข๐Ÿ ๐Ÿ˜ข๐Ÿ˜ธ๐Ÿฝ๐Ÿข๐Ÿถ๐Ÿข๐Ÿ ๐Ÿ˜ฑ๐Ÿฝ๐Ÿข๐Ÿถ๐Ÿข๐Ÿฏ๐Ÿพ๐Ÿผ๐Ÿ˜ข๐Ÿ˜จ๐Ÿ˜ฑ๐Ÿ˜ข๐Ÿ˜ซ๐Ÿ˜ค๐Ÿ ๐Ÿ˜ข๐Ÿ˜ท๐Ÿฝ๐Ÿข๐Ÿณ๐Ÿข๐Ÿ ๐Ÿ˜ข๐Ÿ˜ธ๐Ÿฝ๐Ÿข๐Ÿด๐Ÿข๐Ÿ ๐Ÿ˜ฑ๐Ÿฝ๐Ÿข๐Ÿฑ๐Ÿข๐Ÿฏ๐Ÿพ๐Ÿผ๐Ÿ˜ข๐Ÿ˜จ๐Ÿ˜ฑ๐Ÿ˜ข๐Ÿ˜ซ๐Ÿ˜ค๐Ÿ ๐Ÿ˜ข๐Ÿ˜ท๐Ÿฝ๐Ÿข๐Ÿท๐Ÿข๐Ÿ ๐Ÿ˜ข๐Ÿ˜ธ๐Ÿฝ๐Ÿข๐Ÿด๐Ÿข๐Ÿ ๐Ÿ˜ฑ๐Ÿฝ๐Ÿข๐Ÿฑ๐Ÿข๐Ÿฏ๐Ÿพ๐Ÿผ๐Ÿ˜ฏ๐Ÿ˜ ๐Ÿ˜ณ๐Ÿ˜ง๐Ÿ ๐Ÿ˜ฃ๐Ÿฝ๐Ÿข๐Ÿ˜Œ๐Ÿฒ๐Ÿฌ๐Ÿถ๐Ÿ ๐Ÿ˜‚๐Ÿฒ๐Ÿฌ๐Ÿถ๐Ÿ ๐Ÿณ๐Ÿฌ๐Ÿฑ๐Ÿฒ๐Ÿ ๐Ÿธ๐Ÿฌ๐Ÿถ๐Ÿข๐Ÿฏ๐Ÿพ๐Ÿผ๐Ÿฏ๐Ÿ˜ฒ๐Ÿ˜ต๐Ÿ˜ฆ๐Ÿพ
ฦ’ node dist/base-lol.js < targets/smiley.svg | node dist/base-lol.js --decode
<svg xmlns="http://www.w3.org/2000/svg"><circle fill="#FF0" cx="6" cy="6" r="6"/><circle cx="3" cy="4" r="1"/><circle cx="7" cy="4" r="1"/><path d="M2,6 C2,6 3,12 8,6"/></svg>

About

Encode binary data as emojis! 0xCAFECAFE -> ๐Ÿ’‹๐Ÿ’ฟ๐Ÿ’‹๐Ÿ’ฟ.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published