readUint24 method

int readUint24(
  1. int position,
  2. int fileSize
)

Implementation

int readUint24(int position, int fileSize) {
  if (position >= (_fileSize - 3) || position < 0) {
    return 0;
  }
  if (position < _position || position >= (_position + (_bufferSize - 3))) {
    _readBuffer(position, fileSize);
  }
  var p = position - _position;
  final b1 = _buffer[p++];
  final b2 = _buffer[p++];
  final b3 = _buffer[p++];
  if (byteOrder == BIG_ENDIAN) {
    return b3 | (b2 << 8) | (b1 << 16);
  }
  return b1 | (b2 << 8) | (b3 << 16);
}