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