toBigInt function
Converts 8-bit integer sequence to BigInt.
Parameters:
inputis a sequence of 8-bit integers.- If
msbFirstis true,inputbytes are read in big-endian order giving the first byte the most significant value, otherwise the bytes are read as little-endian order, giving the first byte the least significant value. codecis the BigIntCodec to use. It is derived from the other parameters if not provided.
Throws:
- FormatException when the
inputis empty.
Implementation
BigInt toBigInt(
Iterable<int> input, {
BigIntCodec? codec,
bool msbFirst = false,
}) {
codec ??= _codecFromParameters(msbFirst: msbFirst);
return codec.encoder.convert(input);
}