<div><br><div class="gmail_quote"><div dir="auto">Le mar. 14 nov. 2017 à 23:51, Nico Williams <<a href="mailto:nico@cryptonector.com">nico@cryptonector.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Nov 13, 2017 at 04:26:47PM -0500, Jerry Leichter wrote:<br>
> I haven't seen a direct comparison, but I very much doubt ASN.1 would<br>
<br>
Can we be a bit more pedantically correct?  ASN.1 is *syntax* and has an<br>
associated set of encoding rules.<br>
<br>
Those rules include:<br>
<br>
 - tag-length-value (TLV) encoding rules that suck: BER, DER, CER<br>
<br>
 - PER -- an XDR-like set of rules, but with 1-byte alignment (vs.<br>
   4-byte alignment for XDR)<br>
</blockquote><div dir="auto"><br></div><div dir="auto">Pedantically-wise, PER is bit-aligned, and some padding bits can be added for octet alignment. The Unaligned variant of PER (UPER) is strictly bit-aligned.</div><div dir="auto"><br></div><div dir="auto">PER also can support the encoding of data with a reduced number of bits when told so. For example if a field is declared as 2 characters from the [A,Z] set, an instance of this field will be encoded using 10 bits only. Similar optimizations are applied to integers.</div><div dir="auto"><br></div></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature">Erwann.</div>