Committed to connecting the world

AI for Good Global Summit

Why using ASN.1 as a binary encoding for XML

​Some benefits of the binary encoding rules associated with ASN.1 for the encoding of an XML document are:

  • The binary format is not proprietary and is supported by a lot of tools.
  • No tree information is stored in the binary encoding.
  • Some people say that the major drawback is that a binary encoding is not readable (unless it is converted back to XML markup), however this is not necessary for many applications where most messages are never read by humans.
  • If a binary encoding was pointless, why would have areas like MPEG7 or WAP created their proprietary solution?
  • XML documents can be exchanged with devices that are deemed to have little processing power and limited bandwidth.
  • High throughput transaction processing systems, low bandwidth communications and low-power processors with small memory are not generally places where complex compression algorithms are worthwhile.
  • The application is not slowed down because there is no need to build a dictionary on the fly (the encoder&decoder have been generated once for all).
  • On average the compression rate is better than tools like zip.
  • The application of security functions to ASN.1-defined data is well-established, and the lack of repetitive text sequences, and avoidance of redundancy and general text orientation in its Packed Encoding Rules (PER) make non-disclosure functions much less vulnerable to attack than direct encryption of XML text.