Commit | Line | Data |
---|---|---|
e46e0a76 | 1 | .\" Copyright (c) 1989, 1991 The Regents of the University of California. |
334a2eb3 KB |
2 | .\" All rights reserved. |
3 | .\" | |
e46e0a76 | 4 | .\" %sccs.include.redist.roff% |
334a2eb3 | 5 | .\" |
7e81a7c6 | 6 | .\" @(#)uuencode.format.5 6.5 (Berkeley) %G% |
7e547544 | 7 | .\" |
e46e0a76 CL |
8 | .Dd |
9 | .Dt UUENCODE 5 | |
7e81a7c6 | 10 | .Os BSD 4 |
e46e0a76 CL |
11 | .Sh NAME |
12 | .Nm uuencode | |
13 | .Nd format of an encoded uuencode file | |
14 | .Sh DESCRIPTION | |
7e547544 | 15 | Files output by |
e46e0a76 | 16 | .Xr uuencode 1 |
7e547544 KM |
17 | consist of a header line, |
18 | followed by a number of body lines, | |
19 | and a trailer line. | |
e46e0a76 CL |
20 | The |
21 | .Xr uudecode 1 | |
22 | command | |
7e547544 KM |
23 | will ignore any lines preceding the header or |
24 | following the trailer. | |
25 | Lines preceding a header must not, of course, | |
26 | look like a header. | |
e46e0a76 | 27 | .Pp |
7e547544 | 28 | The header line is distinguished by having the first |
e46e0a76 CL |
29 | 6 characters |
30 | .Dq begin\ \& | |
7e547544 | 31 | The word |
e46e0a76 | 32 | .Em begin |
7e547544 KM |
33 | is followed by a mode (in octal), |
34 | and a string which names the remote file. | |
35 | A space separates the three items in the header line. | |
e46e0a76 | 36 | .Pp |
7e547544 KM |
37 | The body consists of a number of lines, each at most 62 characters |
38 | long (including the trailing newline). | |
39 | These consist of a character count, | |
40 | followed by encoded characters, | |
41 | followed by a newline. | |
42 | The character count is a single printing character, | |
43 | and represents an integer, the number of bytes | |
44 | the rest of the line represents. | |
45 | Such integers are always in the range from 0 to 63 and can | |
46 | be determined by subtracting the character space (octal 40) | |
47 | from the character. | |
e46e0a76 | 48 | .Pp |
7e547544 KM |
49 | Groups of 3 bytes are stored in 4 characters, 6 bits per character. |
50 | All are offset by a space to make the characters printing. | |
51 | The last line may be shorter than the normal 45 bytes. | |
52 | If the size is not a multiple of 3, this fact can be determined | |
53 | by the value of the count on the last line. | |
54 | Extra garbage will be included to make the character count a multiple | |
55 | of 4. | |
56 | The body is terminated by a line with a count of zero. | |
e46e0a76 CL |
57 | This line consists of one |
58 | .Tn ASCII | |
59 | space. | |
60 | .Pp | |
61 | The trailer line consists of | |
62 | .Dq end | |
63 | on a line by itself. | |
64 | .Sh SEE ALSO | |
65 | .Xr uuencode 1 , | |
66 | .Xr uudecode 1 , | |
67 | .Xr uusend 1 , | |
68 | .Xr uucp 1 , | |
69 | .Xr mail 1 | |
70 | .Sh HISTORY | |
71 | The | |
7e81a7c6 | 72 | .Nm uuencode |
e46e0a76 CL |
73 | file format appeared in |
74 | .Bx 4.0 . | |
75 | .\" It was named uuencode.5 prior to 4.3 |