Cannonical OER encoding for default values
Submitted by Botond Baranyi
Link to original bug (#537502)
Description
Currently the OER encoder ignores a field's default value and always encodes its value into the resulting stream (and also indicates that the field is present). In Cannonical OER, if a field is set to its default value, then it is encoded as if it were an omitted optional field (no data is added for the field, and its presence indicator is not set); thus making the result as short as possible.
Example: Seq ::= SEQUENCE { field1 INTEGER, field2 INTEGER DEFAULT 1, field3 INTEGER DEFAULT 0 }
{ field1 := 2, field2 := 1, field3 := 0 } should be encoded into '000102'O (current encoding: 'C0010201010100'O).
Version: 6.4.0