import { IReadable } from '../../types.js'; /** * read exactly N bytes from the source * * @param readable fuman readable stream * @param length length of the buffer to read, or a buffer to read into (when a number is passed, a new buffer will be allocated) * @param onEof what to do when the end of the stream is reached * - `error` - throw an {@link PartialReadError} * - `truncate` - truncate the buffer to the number of bytes that were read. note that this might return 0 bytes */ export declare function exactly(readable: IReadable, length: number | Uint8Array, onEof?: 'error' | 'truncate'): Promise; /** * read the source until it ends, and return the buffer * * @param readable fuman readable stream * @param chunkSize size of the chunks to read */ export declare function untilEnd(readable: IReadable, chunkSize?: number): Promise;