Commit 60d8460
committed
cli: read data from stdin if no '-i' argument is given
This is especially useful for binary data, which may not survive in an argument
list (e.g. due to the presence of NUL bytes).
The 'encode' and 'decode' commands are now exact inverses of each other, so data
will roundtrip correctly, e.g.
$ echo "hello world" | ./multibase encode | ./multibase decode
hello world
$ echo "hello world" | ./multibase encode | ./multibase decode | ./multibase encode
z2yGEbwRFyhPZZckJm
$ echo "hello world" | ./multibase encode
z2yGEbwRFyhPZZckJm1 parent 73bdfb1 commit 60d8460
1 file changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
41 | 59 | | |
42 | 60 | | |
43 | 61 | | |
| |||
0 commit comments