uudecode [ -p ] [ encoded-file ]
The encoded file is an ordinary portable character set text file; it can be edited by any text editor. It is best only to change the mode or decode_pathname in the header to avoid corrupting the decoded binary.
In both cases, the lines have no preceding or trailing blank characters.
The algorithm that is used for lines in between begin and end takes three octets as input and writes four characters of output by splitting the input at six-bit intervals into four octets, containing data in the lower six bits only. These octets are converted to characters by adding a value of 0x20 to each octet, so that each octet is in the range 0x20-0x5f, and then it is assumed to represent a printable character. It then will be translated into the corresponding character codes for the codeset in use in the current locale. (For example, the octet 0x41, representing A , would be translated to A in the current codeset, such as 0xc1 if it were EBCDIC.)
Where the bits of two octets are combined, the least significant bits of
the first octet are shifted left and combined with the most significant
bits of the second octet shifted right.
Thus the three octets A, B, C are converted into the four octets:
0x20 + (( A >> 2 ) & 0x3F) 0x20 + (((A << 4) | ((B >> 4) & 0xF)) & 0x3F) 0x20 + (((B << 2) | ((C >> 6) & 0x3)) & 0x3F) 0x20 + (( C ) & 0x3F)
Each encoded line contains a length character, equal to the number of characters to be decoded plus 0x20 translated to the local character set as described above, followed by the encoded characters. The maximum number of octets to be encoded on each line is 45.
The encoded file's size is expanded by 35% (3 bytes become 4, plus control information), causing it to take longer to transmit than the equivalent binary.
The user on the remote system who is invoking uudecode (typically uucp) must have write permission on the file specified in the decode_pathname.
If you uuencode then uudecode a file in the same directory, you will overwrite the original file.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97