bitsToBigInt static method
Implementation
static BigInt bitsToBigInt(List<bool> bits, {Endian endian = Endian.little}) {
BigInt value = BigInt.zero;
int n = bits.length;
if (endian == Endian.little) {
for (int i = 0; i < n; i++) {
if (bits[i]) {
value |= (BigInt.one << i);
}
}
} else {
for (int i = 0; i < n; i++) {
if (bits[i]) {
value |= (BigInt.one << (n - 1 - i));
}
}
}
return value;
}