Mercurial > hg > Applications > mh
comparison miscellany/compress-4.0/btoa.1 @ 0:bce86c4163a3
Initial revision
author | kono |
---|---|
date | Mon, 18 Apr 2005 23:46:02 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bce86c4163a3 |
---|---|
1 .TH BTOA 1 local | |
2 .SH NAME | |
3 btoa, atob, tarmail, untarmail \- encode/decode binary to printable ASCII | |
4 .SH SYNOPSIS | |
5 .B btoa | |
6 .br | |
7 .B atob | |
8 .br | |
9 .B tarmail | |
10 who subject files ... | |
11 .br | |
12 .B untarmail | |
13 [ file ] | |
14 .SH DESCRIPTION | |
15 .I Btoa | |
16 is a filter that reads anything from the standard input, and encodes it into | |
17 printable ASCII on the standard output. It also attaches a header and checksum | |
18 information used by the reverse filter | |
19 .I atob | |
20 to find the start of the data and to check integrity. | |
21 .PP | |
22 .I Atob | |
23 reads an encoded file, strips off any leading and | |
24 trailing lines added by mailers, and recreates a copy of the original file | |
25 on the standard output. | |
26 .I Atob | |
27 gives NO output (and exits with an error message) if its input is garbage or | |
28 the checksums do not check. | |
29 .PP | |
30 .I Tarmail | |
31 is a shell script that tar's up all the given files, pipes them | |
32 through | |
33 .IR compress "," | |
34 .IR btoa "," | |
35 and mails them to the given person with the given subject phrase. For | |
36 example: | |
37 .PP | |
38 .in 1i | |
39 tarmail ralph "here it is ralph" foo.c a.out | |
40 .in -1i | |
41 .PP | |
42 Will package up files "foo.c" and "a.out" and mail them to "ralph" using | |
43 subject "here it is ralph". Notice the quotes on the subject. They are | |
44 necessary to make it one argument to the shell. | |
45 .PP | |
46 .I Tarmail | |
47 with no args will print a short message reminding you what the required args | |
48 are. When the mail is received at the other end, that person should use | |
49 mail to save the message in some temporary file name (say "xx"). | |
50 Then saying "untarmail xx" | |
51 will decode the message and untar it. | |
52 .I Untarmail | |
53 can also be used as a filter. By using | |
54 .IR tarmail "," | |
55 binary files and | |
56 entire directory structures can be easily transmitted between machines. | |
57 Naturally, you should understand what tar itself does before you use | |
58 .IR tarmail "." | |
59 .PP | |
60 Other uses: | |
61 .PP | |
62 compress < secrets | crypt | btoa | mail ralph | |
63 .PP | |
64 will mail the encrypted contents of the file "secrets" to ralph. If ralph | |
65 knows the encryption key, he can decode it by saving the mail (say in "xx"), | |
66 and then running: | |
67 .PP | |
68 atob < xx | crypt | uncompress | |
69 .PP | |
70 (crypt requests the key from the terminal, | |
71 and the "secrets" come out on the terminal). | |
72 .SH AUTHOR | |
73 Paul Rutter (modified by Joe Orost) | |
74 .SH FEATURES | |
75 .I Btoa | |
76 uses a compact base-85 encoding so that | |
77 4 bytes are encoded into 5 characters (file is expanded by 25%). | |
78 As a special case, 32-bit zero is encoded as one character. This encoding | |
79 produces less output than | |
80 .IR uuencode "(1)." | |
81 .SH "SEE ALSO" | |
82 compress(1), crypt(1), uuencode(1), mail(1) |