Closed jannschu closed 4 years ago
Hi,
when parsing oids the binary representation is converted to Vec<u64>.
Vec<u64>
I propose to keep the binary representation and provide api for the conversion to Vec<u64> (or an iterator implementation).
In my case I use oids basically only for comparison with other oids.
The downsides I see for my proposal are:
Oid
The advantages:
u64
I also propose to add a proc macro for easy construction and a Hash implementation.
Hash
I can implement the proposed changes if you are interested.
Closing, merged in #18
Hi,
when parsing oids the binary representation is converted to
Vec<u64>
.I propose to keep the binary representation and provide api for the conversion to
Vec<u64>
(or an iterator implementation).In my case I use oids basically only for comparison with other oids.
The downsides I see for my proposal are:
Oid
would get an lifetime parameter (users of der-parser already handle lifetimes a lot, so I don't think this is a big issue)The advantages:
Oid
becomes smaller. In particular cloning does not heap allocate which is useful if you use them in many places.u64
can be too small (?)I also propose to add a proc macro for easy construction and a
Hash
implementation.I can implement the proposed changes if you are interested.