yEnc

From Wikipedia, the free encyclopedia

yEnc is a binary-to-text encoding scheme for transferring binary files in messages on Usenet or via e-mail. It reduces the overhead over previous US-ASCII-based encoding methods by using an 8-bit Extended ASCII encoding method. yEnc's overhead is often as little as 1–2%, compared to 33%–40% overhead for 6-bit encoding methods like uuencode and Base64.

With decreased overhead, the encoded message body is smaller. Therefore, the message can be delivered faster and requires less storage space.

An additional advantage of yEnc over previous encoding methods, such as uuencode and Base64, is the inclusion of a CRC checksum to verify that the decoded file has been delivered intact.

yEnc was created and released into the public domain by Jürgen Helbing in 2001.

Contents

[edit] How yEnc works

Usenet and email message bodies were intended to contain only ASCII characters (RFC 822 or RFC 2822). Most competing encodings represent binary files by converting them into printable ASCII characters, because the range of printable ASCII characters is supported by most operating systems. However, since this reduces the available character set considerably, there is significant overhead. For example, in uuencode, three bytes of data are encoded into four printable ASCII characters, which equals four bytes, a 33% overhead (not including the overhead from headers). yEnc uses one character (one byte) to represent one byte of the file, with a few exceptions.

The RFCs that define Internet messages still require that carriage returns and line feeds have special meaning in a mail message. Therefore, yEnc escapes the carriage return and line feed characters in the encoded body.

There is no RFC or other standards document describing yEnc. The yEnc homepage contains a draft informal specification and a grammar (which contradicts RFC 2822 and RFC 2045), although neither has been submitted to the Internet Engineering Task Force.

As with uuencoding, despite its flaws, yEnc remains active and effective on Usenet. The yEnc homepage states that "all major newsreaders have been extended to yEnc support". Microsoft's Outlook Express and Mozilla's Thunderbird are two major newsreaders that do not provide direct yEnc support for either news or mail, but there are plugins available.

[edit] Criticisms

The creator of the yEnc encoding scheme and others have criticized the design of yEnc. It suffers from many of the same flaws as uuencode does, a number of which had already been solved years before by MIME (which addressed the same flaws in uuencode). For example, yEnc requires the strings "=ybegin" and "=yend" to be placed around the encoded file in the message body. Although this is an improvement over uuencode's "begin" and "end", which occur more frequently in normal text, message readers can still encounter attachments where those strings are present (most frequently in discussions about yEnc itself). yEnc and uuencode also attempt to reassemble files split into multiple messages by using the subject line, which is unreliable.

Moreover, yEnc adds a few new flaws of its own. It attempts to turn unstructured fields into structured ones, which is unreliable, given that no constraints can be placed upon the unstructured use of the fields by non-yEnc uses. Most notably, the subject line of the message is supposed to contain the string "yEnc", the filename, and the part number. (The yEnc homepage chastises yEnc article posters for themselves not observing these constraints.) MIME places all such information in the message headers, which is far more reliable.

Uuencode was careful to support Internet messages as streams of text, which yEnc does not support. Software that supports yEnc encoding must know the size of the original file in advance, because the file size is specified in the yEnc header that precedes the encoded file.

Not all transports can handle the 8-bit characters employed by yEnc, which may cause data corruption. yEnc can also be mangled by different character sets. It works poorly with the increasingly popular UTF-8 character set, for instance. Moreover, some article transports may, on the grounds of enforcing compliance with the Internet message format standard, automatically convert any message using 8-bit characters to either Base64 or quoted-printable, entirely nullifying the overhead advantage.

Critics also take issue with the lack of formal standardization.

Some people, including yEnc's creator, have suggested including yEnc as part of MIME, which would solve nearly all of its problems and retain the low encoding overhead. However, as of March 2006, no formal or informal standard has been reached.

[edit] See also

[edit] External links

Languages