What is bin64?

Bin64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. This encoding is commonly used for transmitting binary data over text-based protocols such as email or HTTP.

Bin64 encoding operates by grouping binary data into 6-bit chunks, which are then mapped to their ASCII equivalents. The resulting encoded string is longer than the original binary data, as each group of 3 bytes becomes 4 characters in the encoded string.

This encoding is commonly used in email attachments, where binary data (such as images or documents) can be included in messages without causing errors or corruption due to text-only transmission protocols. The Bin64 encoding scheme is defined in RFC 4648.