Module encode

Module encode 

Source
Expand description

Canonical encoding and decoding for BigInt.

Binary format: [sign: u8][limb_count: u32 LE][limbs: u64[] LE]

All fields are encoded little-endian. The encoding is canonical, meaning exactly one valid encoding exists per integer value.

Functionsยง

decode
Decode a BigInt from canonical binary format.
encode
Encode a BigInt to canonical binary format.