import { createStream } from 'seroval'; export declare function toBase64(bytes: Uint8Array): string; export declare function fromBase64(value: string): Uint8Array; /** `'t' + utf8` for a valid UTF-8 chunk, otherwise `'b' + base64`. */ export declare function encodeText(value: Uint8Array): string; export declare function decodeText(value: string): Uint8Array; /** * Pump a byte stream into a Seroval stream, one encoded chunk per read. * Returns the Seroval stream and a `stop` function that cancels the reader * without signalling the Seroval stream; the abort signal and read failures * stop the pump and throw through the Seroval stream. */ export declare function pumpEncodedStream(readable: ReadableStream, encode: (value: Uint8Array) => string, signal?: AbortSignal): readonly [import('seroval').Stream, (reason?: unknown) => boolean]; /** Rebuild a byte stream from encoded Seroval stream chunks. */ export declare function fromEncodedStream(source: ReturnType>, decode: (value: string) => Uint8Array): ReadableStream>;