2022-05-17 00:18:01 +02:00
|
|
|
# based
|
|
|
|
|
2022-05-17 00:26:31 +02:00
|
|
|
A commandline tool that lets you encode and decode most of the bases.
|
|
|
|
|
2022-09-19 23:11:13 +02:00
|
|
|
Release binary is statically linked and stripped via
|
2022-05-17 20:58:43 +02:00
|
|
|
```sh
|
2022-05-19 23:55:26 +02:00
|
|
|
cabal v2-build --enable-executable-static -O2
|
2022-09-19 23:11:13 +02:00
|
|
|
strip --strip-all based
|
2022-05-17 20:58:43 +02:00
|
|
|
```
|
|
|
|
|
2024-05-22 22:33:27 +02:00
|
|
|
Do not forget to set `$LD_LIBRARY_PATH` to the directory of your static libs.
|
|
|
|
|
2022-05-17 00:26:31 +02:00
|
|
|
## Compilation
|
|
|
|
|
2022-05-17 20:58:43 +02:00
|
|
|
* If you want to compile your own build, link it dynamically via
|
2022-05-17 00:26:31 +02:00
|
|
|
```sh
|
2022-05-19 23:55:26 +02:00
|
|
|
git clone https://git.stefan.works/whx/based.git
|
2022-05-17 20:58:43 +02:00
|
|
|
cd based/
|
|
|
|
cabal install
|
2022-05-17 00:26:31 +02:00
|
|
|
cabal run
|
|
|
|
```
|
|
|
|
|
2022-05-20 00:14:22 +02:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
* Pipe via stdin to transcode
|
2022-05-20 00:16:17 +02:00
|
|
|
* Modes are __encode__ and __decode__
|
2022-05-20 00:14:22 +02:00
|
|
|
* 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
|
2022-05-20 00:17:12 +02:00
|
|
|
```sh
|
2022-05-20 00:14:22 +02:00
|
|
|
echo '>OwJh>}AQ;r@@Y?FF' | based --b91
|
2022-05-20 00:17:12 +02:00
|
|
|
Hello, World!
|
2022-05-20 00:14:22 +02:00
|
|
|
```
|
|
|
|
|
2022-09-19 23:11:13 +02:00
|
|
|
## What is Transcoded?
|
|
|
|
|
|
|
|
The following are the supported encodings
|
|
|
|
* Base91
|
|
|
|
* Base85
|
|
|
|
* Base64
|
|
|
|
* Base64url
|
|
|
|
* URI Encoding
|
|
|
|
* Base62
|
|
|
|
* Base58
|
|
|
|
* Base32
|
|
|
|
* Quoted-Printable
|
|
|
|
* UU Encoding
|
|
|
|
* XX Encoding
|
|
|
|
* yEncoding
|
2024-05-22 22:33:27 +02:00
|
|
|
* Rotate (1..26)
|
|
|
|
* Unicode to hex and vice versa
|
|
|
|
* Unicode to dec and vice versa
|
|
|
|
* Unicode to oct and vice versa
|
|
|
|
* Unicode to bin and vice versa
|
|
|
|
* ~~Char to Hex and vice versa~~
|
|
|
|
* ~~Decimal to Hex and vice versa~~
|
|
|
|
* ~~Oktal to Hex and vice versa~~
|
|
|
|
* ~~Binary to Hex and vice versa~~
|
2022-09-19 23:11:13 +02:00
|
|
|
|