TiffDataSource

interface TiffDataSource

Random-access byte source over a TIFF container. A tiled GeoTIFF is read block-by-block on demand — never slurped whole — so the same 2 GB orthophoto that would blow the heap as a ByteArray streams one 256×256 tile at a time through this seam.

Implementations must tolerate concurrent read calls: pyramid tiles decode in parallel on the IO dispatcher, so a stateful backend (a file handle with a seek position) has to serialize internally.

read returns at most length bytes and fewer only at end-of-source; callers treat a short read as a truncated file.

Inheritors

FileTiffDataSource

Properties

Link copied to clipboard
abstract val size: Long

Total byte length of the container.

Functions

Link copied to clipboard
open fun close()

Release the underlying handle. Idempotent; no-op by default.

Link copied to clipboard
abstract fun read(offset: Long, length: Int): ByteArray

Read up to length bytes starting at offset.