toBigInt function

BigInt toBigInt(
  1. Iterable<int> input, {
  2. BigIntCodec? codec,
  3. bool msbFirst = false,
})

Converts 8-bit integer sequence to BigInt.

Parameters:

  • input is a sequence of 8-bit integers.
  • If msbFirst is true, input bytes 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.
  • codec is the BigIntCodec to use. It is derived from the other parameters if not provided.

Throws:

Implementation

BigInt toBigInt(
  Iterable<int> input, {
  BigIntCodec? codec,
  bool msbFirst = false,
}) {
  codec ??= _codecFromParameters(msbFirst: msbFirst);
  return codec.encoder.convert(input);
}