NAME
uuencode — format of an encoded uuencode file
DESCRIPTION
Files output by
uuencode
consist of a header line followed by a number of body lines,
and a trailer line.
The
uudecode
command ignores any lines preceding the header or
following the trailer (see
uuencode(1)).
Lines preceding a header must not look like a header.
The header line consists of the word
begin
followed by a space, a mode (in octal), another space, and
a string which specifies the name of the remote file.
The body consists of a number of lines,
each containing 62 or fewer characters (including trailing new-line).
These lines consist of a character count,
followed by encoded characters, followed by a newline.
The character count is a single printing character,
which represents an integer.
This integer is the number of bytes in the rest of the line,
and always ranges from 0 to 63.
The byte count can be determined
by subtracting the equivalent octal value of an ASCII
space character (octal 40) from the character.
Groups of 3 bytes are stored in 4 characters, 6 bits per character.
All are offset by a space to make the characters printable.
The last line may be shorter than the normal 45 bytes.
If the size is not a multiple of 3, this fact can be determined
by the value of the count on the last line.
Extra meaningless data will be included, if necessary,
to make the character count a multiple of 4.
The body is terminated by a line with a count of zero.
This line consists of one ASCII space.
The trailer line consists of the word
end
on a line by itself.