72 lines
1.2 KiB
Markdown
72 lines
1.2 KiB
Markdown
# based
|
|
|
|
A commandline binary-to-text encoder which has most
|
|
common bases included.
|
|
|
|
Release binary is statically linked and stripped via
|
|
```sh
|
|
cabal v2-build --enable-executable-static -O2
|
|
strip --strip-all based
|
|
```
|
|
|
|
Do not forget to set `$LD_LIBRARY_PATH` to the directory of your static libs,
|
|
e.g. `export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu`.
|
|
|
|
## Compilation
|
|
|
|
* If you want to compile your own build, link it dynamically via
|
|
|
|
```sh
|
|
git clone https://git.stefan.works/whx/based.git
|
|
cd based/
|
|
cabal install
|
|
cabal run
|
|
```
|
|
|
|
## Download Binary
|
|
|
|
If you want to download the statically linked binary, fetch the latest release
|
|
from https://git.stefan.works/whx/based/releases .
|
|
|
|
## Usage
|
|
|
|
* Pipe via stdin to transcode
|
|
* Modes are __encode__ and __decode__
|
|
* Encoding is done in the following way
|
|
```sh
|
|
echo Hello, World! | based encode --b91
|
|
>OwJh>}AQ;r@@Y?FF
|
|
```
|
|
* Decoding is implicated in the following way
|
|
```sh
|
|
echo '>OwJh>}AQ;r@@Y?FF' | based --b91
|
|
Hello, World!
|
|
```
|
|
|
|
### Tests
|
|
|
|
Run `cabal test`
|
|
|
|
## What is Transcoded?
|
|
|
|
The following are the supported encodings
|
|
|
|
* Base91
|
|
* Base85
|
|
* Base64
|
|
* Base64url
|
|
* URL Encoding
|
|
* Base62
|
|
* Base58
|
|
* Base45
|
|
* Base32
|
|
* Base16
|
|
* Base10
|
|
* Base2
|
|
* Quoted-Printable
|
|
* UU Encoding
|
|
* XX Encoding
|
|
* yEncoding
|
|
* Rotate (1..26)
|
|
|