/** * Encode a string into Uint8Array respecting the specified encoding. * * `TextEncoder` only supports UTF-8, so we need manual implementations for * other Node.js encodings (latin1, ascii, hex, base64, base64url). * This is used by the browser `Readable.push()` and `unshift()` to match * Node.js `Buffer.from(string, encoding)` behavior. */ export declare function stringToEncodedBytes(str: string, encoding?: string): Uint8Array; /** * Normalize a binary-like value into Uint8Array. */ export declare const toBinaryChunk: (value: unknown) => Uint8Array | null; /** * Convert any stream chunk to bytes for text decoding. * Handles: string, Uint8Array, ArrayBuffer, TypedArray, Array, array-like objects. * Returns null if the chunk type is not recognized. * * Shared by both Node.js and browser streamToString / streamToBuffer. */ export declare const toStreamBytes: (chunk: unknown) => Uint8Array | null;