readUint24 method

int readUint24()

Read a 24-bit word from the stream.

Implementation

int readUint24() {
  final b1 = buffer[offset++] & 0xff;
  final b2 = buffer[offset++] & 0xff;
  final b3 = buffer[offset++] & 0xff;
  if (bigEndian) {
    return b3 | (b2 << 8) | (b1 << 16);
  }
  return b1 | (b2 << 8) | (b3 << 16);
}