SvsFile constructor

SvsFile(
  1. RandomAccessFile raf,
  2. Endian endian,
  3. int firstIfdOffset, [
  4. bool isBigTiff = false,
  5. String? filePath,
  6. int maxConcurrency = 4,
])

Creates an SvsFile instance.

maxConcurrency specifies the maximum number of concurrent file handles used for parallel reads (default: 4). For slow mechanical HDDs or resource-constrained devices, set to 1 or 2 to avoid seek thrashing. For fast SSDs/NVMe, higher values (e.g. 4 to 8) maximize read throughput.

Implementation

SvsFile(
  this.raf,
  this.endian,
  this.firstIfdOffset, [
  this.isBigTiff = false,
  this.filePath,
  int maxConcurrency = 4,
])  : _maxConcurrency = maxConcurrency < 1 ? 1 : maxConcurrency,
      _effectiveMaxConcurrency = maxConcurrency < 1 ? 1 : maxConcurrency {
  _allHandles.add(raf);
  _availableHandles.add(raf);
}