osp2i static method
Implementation
static BigInt osp2i(Iterable<int> bytes, {Endian endian = Endian.big}) {
  var result = BigInt.from(0);
  if (endian == Endian.little) {
    bytes = bytes.toList().reversed;
  }
  for (var byte in bytes) {
    result = result << 8;
    result |= BigInt.from(byte);
  }
  return result;
}