Type definition for reading content from a VersaTiles container.
This is useful for implementing new container readers, e.g. reading over other network protocols.
A reader may optionally expose a close method to release any underlying resources (e.g. a file descriptor). Container.close calls it if present.
close
If position is less than 0 or if length is less than 0.
position
length
If the sum of position and length exceeds the size of the content (filesize).
If there is any filesystem or network error such as the content not being accessible or readable.
The byte offset at which to start reading.
The number of bytes to read.
A promise that resolves with the data read as a Buffer.
Optional
Releases any underlying resources held by the reader (e.g. an open file descriptor). Optional; readers that hold no resources may omit it. After close resolves, the reader must not be called again.
Type definition for reading content from a VersaTiles container.
This is useful for implementing new container readers, e.g. reading over other network protocols.
A reader may optionally expose a
closemethod to release any underlying resources (e.g. a file descriptor). Container.close calls it if present.Throws
If
positionis less than 0 or iflengthis less than 0.Throws
If the sum of
positionandlengthexceeds the size of the content (filesize).Throws
If there is any filesystem or network error such as the content not being accessible or readable.