Codecs could drop leading zeros/ones from constrained integer bytes before constructing the type #310
Labels
area/codec
Related to a new or existing ASN.1 codec.
area/types
Related to rasn’s types for ASN.1
help wanted
Extra attention is needed
kind/enhancement
New feature or request
Sometimes when decoding constrained integer types, it is acceptable for the codec that there are many leading zeros or ones which do not actually affect for the integer value.
When the constrained integer type is not using Rust integer primitive types directly, but rather the new variable-sized
Integer
type, decoding could get small performance benefits if those bytes are dropped. This would result into increased usage of the internalisize
type rather than allocatedBitInt
type, particularly on32-bit
platforms.The text was updated successfully, but these errors were encountered: