UUENCODE encoding and decoding

zhaozj2021-02-17  37

UUENCODE is an encoding method for UUCP (UNIX to UNIX COPY), which is used in previous Unix. Base64 belongs to MIME (multi-purpose Internet mail extension) encoding, and UUENCODE is not the same category, MIME main application In the email, UUENCODE is primarily applied in the mail and newsgroup. The beginning ofUUENCODE is: Begin END encoding algorithm is constantly listed in a group (less than 3 bytes) Zero Rating) Then, the 24-bit data is divided into 4 groups, 6 bits per group, and then the resulting 6-bit binary number is mapped to the character between the ASCII code 32 to 95, and each line is started with M (indicated 32 45) ), 60 characters (including "m"), the last line starts with 32 N ASCII characters, n is the number of input bytes encoded in the last line. Encoding with a line containing only one space and only "end" One line ends.

From a front part and the base64 has no difference (see http://www.9cbs.net/develop/read_article.asp?id=8843), all convert 3 characters to 4 characters, Different is the base64 by its own Base64 code, and uuencode is a code table directly using the ASCII code.

Eg.begin ..... M1 &% T93H ("@ (" @ (# 0o-2 '/ y-2'YC, SC $ P ($% - # 0i &

转载请注明原文地址:https://www.9cbs.com/read-29885.html

New Post(0)