/** * Read Stream - Memory-Efficient File Reading * * Provides streaming file operations for large files with: * - Chunk-based reading (configurable chunk size) * - Progress tracking and callbacks * - Cancellation support via AbortSignal * - Memory-efficient processing (never loads full file) */ export interface StreamOptions { chunkSize?: number; onProgress?: (bytesRead: number, totalBytes: number) => void; onChunk?: (chunk: Buffer, index: number) => void; signal?: AbortSignal; highWaterMark?: number; } export interface StreamResult { bytesRead: number; chunksProcessed: number; duration: number; cancelled: boolean; } export declare class ReadStream { /** * Stream file in chunks with progress tracking */ streamFile(filePath: string, options?: StreamOptions): Promise; /** * Process file chunks with async callback * Memory-efficient: only one chunk in memory at a time */ processChunks(filePath: string, processor: (chunk: Buffer, index: number) => Promise, options?: StreamOptions): Promise; /** * Read file as async iterator of chunks * Useful for for-await-of loops */ iterateChunks(filePath: string, options?: StreamOptions): AsyncGenerator; /** * Get file size without reading entire file */ getFileSize(filePath: string): Promise; } export declare const readStream: ReadStream; //# sourceMappingURL=read-stream.d.ts.map