Metadata-Version: 2.1
Name: base26
Version: 1.0.3
Summary: Package implements base26 encoding/decoding algorithm.
Author-email: Sergey Popinveskiy <sergey@yggdr.io>
License: MIT
Project-URL: Source, https://github.com/yggdr-corp/pybase26
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE.txt

# base26

![PyPI](https://img.shields.io/pypi/v/base26)

This library provides functions for encoding binary data to printable ASCII
characters and decoding such encodings back to binary data.
The algorithm is Base26.

Base26 encoding takes binary data (a byte array) and converts it into a stream
of letters, drawn from a 26-character pool in capital letters,
e.g. byte arrays of 0xA5, 0x05, 0x4B = Base26 encoded value of "TDTTKA".

Decoding is the reverse of encoding, taking a string of capital letters
and turning it back into a byte array. The Base26 decoding algorithm
may add an extra 0 byte at the end of the returned payload. The algorithm
should check for this: typically, if the returned payload size is 129
and if it is equal to 0 remove it.

It's similar to Base64 but with a smaller pool of characters.

```text
Base64 = ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
Base26 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
```

## Development

Install dependencies

```sh
python -m pip install pip-tools
pip-compile --extra dev pyproject.toml
pip-sync
```

Install base26 package in editable mode

```sh
python -m pip install -e .
```

Run tests

```sh
pytest tests
```
