19b50d902SRodney W. Grimes.\" Copyright (c) 1989, 1991, 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
289b50d902SRodney W. Grimes.\"	@(#)uuencode.format.5	8.2 (Berkeley) 1/12/94
29c3aac50fSPeter Wemm.\" $FreeBSD$
309b50d902SRodney W. Grimes.\"
319b50d902SRodney W. Grimes.Dd January 12, 1994
329b50d902SRodney W. Grimes.Dt UUENCODE 5
3362500372SRuslan Ermilov.Os
349b50d902SRodney W. Grimes.Sh NAME
359b50d902SRodney W. Grimes.Nm uuencode
369b50d902SRodney W. Grimes.Nd format of an encoded uuencode file
379b50d902SRodney W. Grimes.Sh DESCRIPTION
389b50d902SRodney W. GrimesFiles output by
399b50d902SRodney W. Grimes.Xr uuencode 1
409b50d902SRodney W. Grimesconsist of a header line,
419b50d902SRodney W. Grimesfollowed by a number of body lines,
429b50d902SRodney W. Grimesand a trailer line.
439b50d902SRodney W. GrimesThe
449b50d902SRodney W. Grimes.Xr uudecode 1
459b50d902SRodney W. Grimescommand
469b50d902SRodney W. Grimeswill ignore any lines preceding the header or
479b50d902SRodney W. Grimesfollowing the trailer.
489b50d902SRodney W. GrimesLines preceding a header must not, of course,
499b50d902SRodney W. Grimeslook like a header.
509b50d902SRodney W. Grimes.Pp
519b50d902SRodney W. GrimesThe header line is distinguished by having the first
529b50d902SRodney W. Grimes6 characters
539b50d902SRodney W. Grimes.Dq begin\ \&
549b50d902SRodney W. Grimes(note the trailing space).
559b50d902SRodney W. GrimesThe word
569b50d902SRodney W. Grimes.Em begin
579b50d902SRodney W. Grimesis followed by a mode (in octal),
589b50d902SRodney W. Grimesand a string which names the remote file.
599b50d902SRodney W. GrimesA space separates the three items in the header line.
609b50d902SRodney W. Grimes.Pp
619b50d902SRodney W. GrimesThe body consists of a number of lines, each at most 62 characters
629b50d902SRodney W. Grimeslong (including the trailing newline).
639b50d902SRodney W. GrimesThese consist of a character count,
649b50d902SRodney W. Grimesfollowed by encoded characters,
659b50d902SRodney W. Grimesfollowed by a newline.
669b50d902SRodney W. GrimesThe character count is a single printing character,
679b50d902SRodney W. Grimesand represents an integer, the number of bytes
689b50d902SRodney W. Grimesthe rest of the line represents.
69d4e66251SWolfram SchneiderSuch integers are always in the range from 1 to 45 or 64 and can
709b50d902SRodney W. Grimesbe determined by subtracting the character space (octal 40)
719b50d902SRodney W. Grimesfrom the character.
72d4e66251SWolfram SchneiderCharacter 64 represents a count of zero.
739b50d902SRodney W. Grimes.Pp
749b50d902SRodney W. GrimesGroups of 3 bytes are stored in 4 characters, 6 bits per character.
75d4e66251SWolfram SchneiderAll characters are always in range from 1 to 64 and are offset by a
7687faa07bSSheldon Hearnspace (octal 40) to make the characters printing.
7787faa07bSSheldon HearnCharacter
78d4e66251SWolfram Schneider64 represents a count of zero.
799b50d902SRodney W. GrimesThe last line may be shorter than the normal 45 bytes.
809b50d902SRodney W. GrimesIf the size is not a multiple of 3, this fact can be determined
819b50d902SRodney W. Grimesby the value of the count on the last line.
8266e06245SRuslan ErmilovExtra null characters will be included to make the character count a multiple
839b50d902SRodney W. Grimesof 4.
849b50d902SRodney W. GrimesThe body is terminated by a line with a count of zero.
859b50d902SRodney W. GrimesThis line consists of one
869b50d902SRodney W. Grimes.Tn ASCII
87229cd11bSJoerg Wunschbackquote (octal 140) character.
889b50d902SRodney W. Grimes.Pp
899b50d902SRodney W. GrimesThe trailer line consists of
909b50d902SRodney W. Grimes.Dq end
919b50d902SRodney W. Grimeson a line by itself.
929b50d902SRodney W. Grimes.Sh SEE ALSO
93da1ff3cbSWolfram Schneider.Xr mail 1 ,
949b50d902SRodney W. Grimes.Xr uucp 1 ,
95da1ff3cbSWolfram Schneider.Xr uudecode 1 ,
96da1ff3cbSWolfram Schneider.Xr uuencode 1
979b50d902SRodney W. Grimes.Sh HISTORY
989b50d902SRodney W. GrimesThe
998fe908efSRuslan Ermilov.Nm
1009b50d902SRodney W. Grimesfile format appeared in
1019b50d902SRodney W. Grimes.Bx 4.0 .
1029b50d902SRodney W. Grimes.\" It was named uuencode.5 prior to 4.3
103