readBytes method
Implementation
@override
Uint8List readBytes(int offset, int count) {
if (offset < 0 || count < 0 || offset + count > _length) {
throw TiffException(
'Attempted to read past the end of the file (offset=$offset, count=$count, length=$_length)',
);
}
final windowEnd = _windowStart + _window.length;
if (offset < _windowStart || offset + count > windowEnd) {
_fillWindow(offset, count);
}
final localStart = offset - _windowStart;
return Uint8List.sublistView(_window, localStart, localStart + count);
}