splat-transform API Reference - v1.0.0
    Preparing search index...

    Interface ReadSource

    Interface representing a readable data source. Provides size information and creates streams for reading.

    interface ReadSource {
        seekable: boolean;
        size: number;
        close(): void;
        read(start?: number, end?: number): ReadStream;
    }
    Index

    Properties

    Methods

    Properties

    seekable: boolean

    Whether range reads are supported. If false, read() must be called with no arguments or start=0.

    size: number

    The size of the source in bytes, or undefined if unknown. For compressed sources (e.g., gzipped HTTP), this may be approximate.

    Methods

    • Create a stream for reading data, optionally with a byte range.

      Parameters

      • Optionalstart: number

        Starting byte offset (inclusive), defaults to 0

      • Optionalend: number

        Ending byte offset (exclusive), defaults to size/EOF

      Returns ReadStream

      A ReadStream for pulling data

      Error if range requested on non-seekable source