# Binary-to-text encoding

## Definition

> A **binary-to-text encoding** is [encoding](https://en.wikipedia.org/wiki/Code) of [data](https://en.wikipedia.org/wiki/Data_\(computing\)) in [plain text](https://en.wikipedia.org/wiki/Plain_text). More precisely, it is an encoding of binary data in a sequence of [printable characters](https://en.wikipedia.org/wiki/Character_\(computing\)).&#x20;

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.
