Btoa

Jul 20, 2023

Encode/decode binary to printable ASCII

This is a port of btoa version 5.2, written by Paul Rutter, Joe Orost & Stefan Parmark. btoa converts 4 binary characters to 5 ascii ones, causing a 25 expansion. btoa is thus more efficient than uuencode, which causes a 33 expansion. Spaces will not be used, which should make it safe to send files over e-mail or Usenet without risking that blanks become tabs. Each resulting row of text has a single-byte checksum for error detection. A diagnosis file provides a list of errors found this way, which could then be used to retransmit only the failing lines.

Patch 1 is an unofficial, non-platform-specific patch to version 5.2 of btoa. It allows for automatic decoding of btoa files if the program is invoked as “atob” no -a argument necessary. It also outfits the Makefile to do clean and install.



Checkout these related ports:
  • Zbase32 - Base32 Encoder/Decoder
  • Ytnef - Unpack data in MS Outlook TNEF format
  • Yj - Convert between YAML, TOML, JSON, and HCL
  • Yj-bruceadams - Command line tool that converts YAML to JSON
  • Xml2c - Convert an XML file into C struct/string declarations
  • Xdeview - X11 program for uu/xx/Base64/BinHex/yEnc de-/encoding
  • Wkhtmltopdf - Convert HTML (or live webpages) to PDF or image
  • Uulib - Library for uu/xx/Base64/BinHex/yEnc de-/encoding
  • Uudeview - Program for uu/xx/Base64/BinHex/yEnc de-/encoding
  • Unix2dos - Convert ASCII newlines between CR/LF and LF
  • Tuc - Text to Unix Conversion
  • Trans - Character encoding converter generator
  • Tnef - Unpack data in MS Outlook TNEF format
  • Ta2as - TASM to AT&T asm syntax converter (GNU AS)
  • Showkey - Display cooked key sequences (keycap-to-keystrokes mappings)