Binary-to-text encoding

A brief explanation of various Binary-to-text encoding algorithms, what they are used for and how you can make the most of them.

Definition

A binary-to-text encoding is encodingarrow-up-right of dataarrow-up-right in plain textarrow-up-right. More precisely, it is an encoding of binary data in a sequence of printable charactersarrow-up-right.

This is the wikipedia definition of binary-to-text encoding. In this entry we'll be discussing different algorithms, how they work, what their strengths are, and when you should conceptually use them.

Problems it can help solve

Any time you want to transmit or save data where the chanel doesn't allow for binary data, you'll want to run a binary-to-text encoding algorithm.

Topics

In this chapter we'll be discussing the following algorithms:

  1. Base64

  2. Base91

We'll be going over the pros and cons of each of these algorithms, and how they work.

Language

For the purpose of demonstrating certain code examples in this chapter we'll be using C++. You have no reason to worry if you aren't familiar with C++ or with its syntax, as the code examples will feature comments and aside from the code itself I'll also be describing the core ideas verbally.

Last updated