getBigUint method
Reads a region of the buffer as an unsigned big integer
.
Items are read from the range [offset : offset+length]
.
The range must satisy the relations 0
≤ offset
≤ offset+length
≤ this.length
.
final Buffer buffer = Buffer.fromList([255, 255, 255, 255, 255, 255, 255, 255]);
final BigInt value = buffer.getBigUint(0, buffer.length);
print(value); // 18446744073709551615
Implementation
BigInt getBigUint(final int offset, final int length,
[final Endian endian = Endian.little]) {
final Iterable<int> bytes = _data.getRange(offset, offset + length);
return endian == Endian.big ? _getBigUintBE(bytes) : _getBigUintLE(bytes);
}