Skip to content

binary to ASCII converter with ~70% efficiency, Encoder API and command

License

Notifications You must be signed in to change notification settings

james-antill/base50

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card Go Doc Release License: MIT

base50

Base50 is another way to convert binary to ASCII, it is about 70% efficient. Every 7 bytes is turned into a base50 number, with a maximum of 10 ASCII characters used (all but the last one will be 10 characters).

It removes the "difficult" characters from it's Alphabet, much like base58. Unlike base58 each group of 7 bytes can be converted independently, so it can serialize a stream of data (and doesn't have exponential performance characteristics).

If the number of bytes converted isn't evenly divisible by 7 then the final base50 number will be shortened. Base50 does output a stop/padding character but that is only required for input if you concatenate two streams together.

  • To install: go get github.com/james-antill/base50/cmd/base50

Example output

Given the current sha256sum of the base50.go file:

  • base16
    • ffe62174a2d8149e1ffa2701135610fde6407e425b20ff1c021480da60e3954e
  • base32
    • 77TCC5FC3AKJ4H72E4ARGVQQ7XTEA7SCLMQP6HACCSANUYHDSVHA====
  • base36
    • 6DLW81G3WXNT53STCHEDCNDN8QTES2XVUZE7TXAPNCAFCY5Q32
  • base50
    • rwdnuFSFPFXXSNjMp4Ny2rXsm1K9pT5XnkA5a9FmKFm9XH.
  • base58
    • JDvVWzaZ3UdQCpsdUb3nSC2As4S8C2zxAitBEtD552xM
  • base64
    • /+YhdKLYFJ4f+icBE1YQ/eZAfkJbIP8cAhSA2mDjlU4=
  • base64url
    • _-YhdKLYFJ4f-icBE1YQ_eZAfkJbIP8cAhSA2mDjlU4=

About

binary to ASCII converter with ~70% efficiency, Encoder API and command

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published