/** * Reads the input stream and encodes the data to a string. */ export type ReadableStreamToStringFunction = (stream: NodeJS.ReadableStream) => Promise; /** * Creates a function that reads a Node.js ReadableStream and converts its contents to a string using the specified encoding. * * @param encoding - The buffer encoding to use (e.g., 'utf-8', 'base64') * @returns A function that consumes a ReadableStream and resolves to its string content */ export declare function readableStreamToStringFunction(encoding: BufferEncoding): ReadableStreamToStringFunction; /** * ReadableStreamToStringFunction for Base64 */ export declare const readableStreamToBase64: ReadableStreamToStringFunction; /** * Reads all data from a Node.js ReadableStream and concatenates it into a single Buffer. * * @param stream - The readable stream to consume * @returns Promise resolving to a Buffer containing all stream data * @throws Rejects if the stream emits an error event */ export declare function readableStreamToBuffer(stream: NodeJS.ReadableStream): Promise;