GitOidShorten

The OID shortener is used to process a list of OIDs in text form and return the shortest length that would uniquely identify all of them.

Note: This is a refcounted type and can be safely copied by value. The underyling C handle will be released once the reference count reaches zero.

Constructors

this
this()

Default-construction is disabled

this
this(size_t length)

Create a new OID shortener. length is the minimum length which will be used to shorted the OIDs, even if a shorter length can uniquely identify all OIDs.

Members

Functions

add
void add(char[] hex)

Add a new hex OID to the set of shortened OIDs and store the minimal length to uniquely identify all the OIDs in the set. This length can then be retrieved by calling minLength.

Properties

minLength
size_t minLength [@property getter]

Return the current minimum length used to uniquely identify all the stored OIDs.

Meta