unpack32 function

int unpack32(
  1. dynamic inp,
  2. int offset,
  3. Endian endian
)

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);
}