xref: /freebsd/usr.bin/bintrans/uuencode.format.5 (revision 22d7dd834bc5cd189810e414701e3ad1e98102e4)
1.\" Copyright (c) 1989, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"	@(#)uuencode.format.5	8.2 (Berkeley) 1/12/94
29.\"
30.Dd January 12, 1994
31.Dt UUENCODE 5
32.Os
33.Sh NAME
34.Nm uuencode
35.Nd format of an encoded uuencode file
36.Sh DESCRIPTION
37Files output by
38.Xr uuencode 1
39consist of a header line,
40followed by a number of body lines,
41and a trailer line.
42The
43.Xr uudecode 1
44command
45will ignore any lines preceding the header or
46following the trailer.
47Lines preceding a header must not, of course,
48look like a header.
49.Pp
50The header line is distinguished by having the first
516 characters
52.Dq begin\ \&
53(note the trailing space).
54The word
55.Em begin
56is followed by a mode (in octal),
57and a string which names the remote file.
58A space separates the three items in the header line.
59.Pp
60The body consists of a number of lines, each at most 62 characters
61long (including the trailing newline).
62These consist of a character count,
63followed by encoded characters,
64followed by a newline.
65The character count is a single printing character,
66and represents an integer, the number of bytes
67the rest of the line represents.
68Such integers are always in the range from 1 to 45 or 64 and can
69be determined by subtracting the character space (octal 40)
70from the character.
71Character 64 represents a count of zero.
72.Pp
73Groups of 3 bytes are stored in 4 characters, 6 bits per character.
74All characters are always in range from 1 to 64 and are offset by a
75space (octal 40) to make the characters printing.
76Character
7764 represents a count of zero.
78The last line may be shorter than the normal 45 bytes.
79If the size is not a multiple of 3, this fact can be determined
80by the value of the count on the last line.
81Extra null characters will be included to make the character count a multiple
82of 4.
83The body is terminated by a line with a count of zero.
84This line consists of one
85.Tn ASCII
86backquote (octal 140) character.
87.Pp
88The trailer line consists of
89.Dq end
90on a line by itself.
91.Sh SEE ALSO
92.Xr mail 1 ,
93.Xr uucp 1 ,
94.Xr uudecode 1 ,
95.Xr uuencode 1
96.Sh HISTORY
97The
98.Nm
99file format appeared in
100.Bx 4.0 .
101.\" It was named uuencode.5 prior to 4.3
102