- From: Keith Moore <moore@cs.utk.edu>
- Date: Tue, 24 Apr 2001 15:17:54 -0400
- To: Jacob Palme <jpalme@dsv.su.se>
- cc: Keith Moore <moore@cs.utk.edu>, discuss@apps.ietf.org
> >there's more than one kind of typing. in your ASN.1 examples, you don't > >appear to include the "name" of each datum, whereas in your ABNF and XML > >examples, you do. > > The main principle of efficient coding of protocols is to only send > the information which varies over time. Information which is static, > like the names of the fields, is either suppressed or compacted very > strongly. It is this compacting of this information which is a main > reason why the ASN.1 encoding got so compact. This isn't a feature of ASN.1. It's a feature of encoding the field names implicitly via their position in the data stream vs. encoding them explicitly with tags. ASN.1 can do this either way. For instance, SNMP uses ASN.1 but tags each datum with an OID. You can also do positional encoding with RFC 822 headers or XML. It's just a question of how much of the syntax of the underlying data that you expose/export into the outer presentation syntax. > The disadvantage with this, of course, is that the encoded date is > much more difficult to read for a human not using a special program. That's only one disadvantage of positional encoding. You're making assumptions about which data is static and which data isn't static that aren't even appropriate for the examples that you cite, much less in general. > Did you also look at my comparison between RFC822 and XML > > RFC822 example: > From: Father Christmas <fchristmas@northpole.arctic> > > XML encoding of the same information: > > <from> > <user-friendly-name>Father Christmas</user-friendly-name> > <e-mail-address> > <localpart>fchristmas</localpart> > <domainpart> > <domainelement>northpole</domainelement> > <domainelement>arctic</domainelement> > </domainpart> > </from> > > The XML encoding uses five times as many characters. you could have as easily said: <from>Father Christmas <fchristmas@northpole.arctic></from> and that would have been a more accurate comparison. The XML version uses a few more characters, but it's not a huge difference overall. Keith
Received on Tuesday, 24 April 2001 15:18:26 UTC