unpack32 function
Unpacks a 32 bit integer from a byte buffer. The inp
parameter can be an Uint8List or a
ByteData if you will run it several times against the same buffer and want faster execution.
Implementation
int unpack32(dynamic inp, int offset, Endian endian) {
if (inp is! ByteData) {
inp = ByteData.view(inp.buffer, inp.offsetInBytes, inp.length);
}
return inp.getUint32(offset, endian);
}