wolfgang haefelinger wrote:
Greetings,

a client of mine wants to use ASN.1 as a kind of
compression tool. The idea is basically this:

XML -> ASN.1/DER -> XML

Using the mapping from XSD to ASN.1 standardized in ITU-T Rec. X.694 (see http://asn1.elibel.tm.fr/xml/mapping.htm), one can easily transform an XSD schema into an ASN.1 schema, and then benefit of all the advantages of ASN.1.
The other way is to directly write an ASN.1 schema with XER encoding instructions (see http://asn1.elibel.tm.fr/xml/xer.htm). When you apply the EXTENDED-XER encoding rules, an XML document is produced. When you apply the DER or PER encoding rules, a binary encoding is produced from the same unique ASN.1 schema.


In words:

A XML document is taken and encoded into a DER
binary string. Later the DER string is decoded into
an XML document. Due to signatures involved, the XML
document at the beginning and at the end of this process must be identical.


Note that wrote ASN.1/DER  as target binary string -
in fact, any other representation  that is signature
friendly would do as well. I was also thinking about
PER but I believe that PER is not signature friendly,
am I correct?

No, you are wrong here. Canonical PER is signature-friendly and if your customer is really looking to compaction, they should use PER which is more compact and less CPU-consuming.


I wonder whether this is possible and how to do it?

This is definitely possible and is offered by some (but probably not all) of the tools listed at:
http://asn1.elibel.tm.fr/en/links/index.htm#xml


Initially I was thinking about to use (C)XER but after

This was a good idea as I explained above :)

reading http://asn1.elibel.tm.fr/en/xml/xer.htm I'm
getting some doubts.

My questions:
 a. how can I do this?

I think I've answered to this questions above. But you will also find some useful information in OSS Nokalva's white paper: http://www.oss.com/products/exer-whitepaper.pdf

You may also want to have a loot at:
http://list.etsi.org/scripts/wa.exe?A2=ind0205&L=3gpp_tsg_sa_wg5_swgb&D=0&T=0&P=3839

b. how much can I expect as compression rate?

You will find some compression tests in OSS Nokalva's position paper of the W3C organized last year:
http://www.w3.org/2003/08/binary-interchange-workshop/32-OSS-Nokalva-Position-Paper-updated.pdf


You will also find some useful information in some of the articles listed at:
http://asn1.elibel.tm.fr/en/xml/press-releases.html
--
Olivier DUBUISSON
France Telecom
Recherche & Developpement
R&D/MAPS/AMS - 22307 Lannion Cedex - France
t: +33 2 96 05 38 50 - f: +33 2 96 05 39 45 - http://asn1.elibel.tm.fr/



_______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to