logoalt Hacker News

pmarrecklast Monday at 2:39 PM1 replyview on HN

Site isn't loading but I have a neat side project that works with any monospace font that includes Unicode glyphs which converts raw binary to unicode and back while passing through 7-bit ASCII characters, replacing control characters with related symbol representations, and sticking with actually-monospace glyphs (a surprising number of glyphs break the width rule across various "monospace" fonts), while ALSO being denser and more directly legible than hex encoding: https://github.com/pmarreck/printable-binary

Each UTF8 character (1 to 3 bytes) corresponds to 1 byte of input data. The average increase in data size is about 70%, but you gain binary independence in any medium that understands utf8 (email, the terminal, unit tests, etc.)


Replies

jagged-chisellast Monday at 3:39 PM

> ... you gain binary independence in any medium that understands utf8

Nice work! But if you want something like this in production, base64 only increases the size by 33%.