Function il2_iltags::ilint::encode_sign[][src]

pub fn encode_sign(v: i64) -> u64
Expand description

Encodes a signed value into an unsiged value suitable to be encoded as ILInt.

This transformation is designed to minimize the encoding of both negative and positive values with small modules using the ILInt enconding rules. See ILInt Specification. for further information about how this encoding works.

This operation can be undone by decode_sign().

Arguments:

  • v: The value to be encoded;

Returns the signed value ready to be encoded as an ILInt.

New since 1.3.0.