home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!gossip.pyramid.com!decwrl!amdcad!angelo!roberts
- From: roberts@angelo.amd.com (Dave Roberts)
- Subject: Re: Binary to ASCII encodings (was Re: A better mousetrap)
- Message-ID: <1992Dec11.201318.28429@amd.com>
- Sender: usenet@amd.com (NetNews)
- Nntp-Posting-Host: angelo
- Organization: Advanced Micro Devices, Santa Clara, CA
- References: <18287@mindlink.bc.ca> <1992Dec9.132902.7930@unipalm.co.uk>
- Date: Fri, 11 Dec 1992 20:13:18 GMT
- Lines: 26
-
- In article <1992Dec9.132902.7930@unipalm.co.uk> tim@unipalm.co.uk (Tim Goodwin) writes:
-
- >uuencode uses a fixed 3-byte -> 4-character encoding, for a 1.333
- >swell factor. (There is also some additional overhead, for example the
- >line feed at the end of each line, and the "M" at the beginning of
- >each.)
-
- Just a quibble. The "M" at the beginning of the line isn't an "M" per
- say. It's actually a length of the number of character in the line
- that has been encoded in the same fashion as the six bits of normal
- data are. It so happens, however that most (all?) of the programs
- that do uuencoding use the same line length. If you look at the last
- line of the encoded file, however, (the one before the "end" line)
- you'll see that it probably isn't as long as the others and doesn't
- have an "M", but rather something else as the first character.
-
- In other words, if you're writing a decoder, don't look at the first
- character of a line as an "M", look at it as a length. It makes
- everything general, and if anybody writes an encoder that uses a line
- length different than "M" (which I suppose is legal), yours won't be
- the decoder that breaks.
-
- Dave Roberts
- david.roberts@amd.com
-
-
-