]> git.gir.st - base1.git/blob - README.md
added return values to indicate failure
[base1.git] / README.md
1 # base1
2
3 Reimplementation of [ferno][1]'s [`base1`][2] in C for UNIXoid shells.
4
5 ## Why
6 * Why not?
7 * guaranteed to be compatible with __any__ character set, no matter how small
8 (theoretically)
9
10 ## Building
11 To generate the binary, run `make`. Then, copy the resulting `base1` binary to
12 a directory in your `$PATH`.
13
14 ## Usage
15 `base1` uses GNU's [`base64`][4] tool as a reference and therefore has similar
16 command line arguments. This means, you can either pipe data in or give a file
17 as an argument.
18
19 The non-standard parameter `-t` will return the length of the string to be
20 encoded, or warn if it will overflow.
21
22 ### 'Hello World'-Example:
23 Can't do: even on 64 bit machines the length of the resulting string will be
24 larger than `unsigned long long int`. I en- and decoded the string `Hallo` - it
25 took 52 **minutes**!
26
27 echo -n "Hi" | ./base1 -w 0
28
29 will output 18794 `A`s.
30
31 ## License
32 `base1` is released under the GNU General Public License, version 3.
33 See `LICENSE` for details.
34 © 2016 Tobias Girstmair, [isticktoit.net][5]
35
36 ## In other Languages
37 * [JavaScript](https://github.com/ferno/base1)
38
39 [1]: https://github.com/ferno/
40 [2]: https://github.com/ferno/base1
41 [3]: https://twitter.com/girstmair
42 [4]: http://linux.die.net/man/1/base64
43 [5]: http://isticktoit.net/
Imprint / Impressum