Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!ncar!csn!ub!uhura.cc.rochester.edu!rochester!pt.cs.cmu.edu!g.gp.cs.cmu.edu!tgl From: tgl@g.gp.cs.cmu.edu (Tom Lane) Newsgroups: comp.compression Subject: Re: COMPRESSING of binary data into mailable ASCII Message-ID: <12496@pt.cs.cmu.edu> Date: 27 Mar 91 15:41:59 GMT References: <12485@pt.cs.cmu.edu> <1991Mar26.233839.24835@nntp-server.caltech.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 40 I said: > One thing that might be good to avoid is putting '.' at the start > of a line, which btoa will do quite happily. and Mark Adler said: > Why? Sorry to be obscure. NNTP, the standard protocol for shipping netnews messages across Internet, uses '.' alone on a line as end-of-message marker. To ensure that a data line like this can't be mistaken as end-of-message, any '.' appearing at the start of a data line is doubled (sent as '..') and then undoubled at the receiver. Thus, '.' at the start of a line is sent correctly, but you pay extra to send it across the network link. I believe NNTP is derived from the network mail transfer protocol, so the same effect probably holds for ordinary mail messages. Thus, it would be marginally more efficient if we could ensure '.' didn't appear at the start of a line. The only simple way I can see to do this is not to use '.' at all in the encoding character set. If we can get 85 safe characters without '.', then it'd be a win. > Are the any other things to avoid that people out > there knows messes up mailers? I already know about an indented first > line getting chewed up sometimes. I think it's pretty clear that we don't want to use space as one of the encoding characters: it's likely to get lost if it is the first or last character in a line, some overenthusiastic programs may translate runs of spaces into tabs, etc etc. The '.' business and EBCDIC compatibility are the only other constraints I know about. Mark, would you mind posting the character set you use for 'ship'? I wasn't paying attention at the time... -- tom lane Internet: tgl@cs.cmu.edu BITNET: tgl%cs.cmu.edu@cmuccvma