/** * @license MIT * @author Teffen Ellis, et al. * @copyright Sister Software */ import { type AsyncChunkIterator } from "#internal/shared"; /** * The path a delimited file is read from: `path.zst` when it exists, else `path.gz` when it exists, else `path`. * * A corpus converted one part file at a time then reads the same whether a part has been compressed yet or not: a * reader asks for `part-0000.jsonl` and gets `part-0000.jsonl.zst` once the conversion has reached it. A path that * already names a compressed file, and any source that is not a path, is returned unchanged. */ export declare function resolveCompressedSibling(source: T): Promise; /** * Create a readable stream from a file system source. * * Anything but a non-empty string path reads `process.stdin`, which must not be a TTY. */ export declare function createReadStream(source: unknown, highWaterMark: number): Promise; export interface CreateChunkIteratorOptions { /** * The buffer chunk size to read from the file, i.e. the high-water mark for the file read. */ highWaterMark?: number; /** * The byte position to start reading from. */ start?: number; /** * The byte position to stop reading at, **inclusive** (matches Node `createReadStream({ end })`). To read the * half-open range `[start, end)`, pass `{ start, end: end - 1 }`. */ end?: number; } export default createChunkIterator; //# sourceMappingURL=reader.d.ts.map