export { encodeU32, decodeU32, concat, encodeLengthPrefixedFrames, encodeLengthPrefixedString, readLengthPrefixedString, encodeIndexedFrame, decodeIndexedFrame, encodeRequestEnvelope, textEncoder, textDecoder, }; declare const textEncoder: { encode: (input?: string) => Uint8Array; }; declare const textDecoder: TextDecoder; type RequestEnvelopePart = Blob | Uint8Array; declare function encodeU32(n: number): Uint8Array; declare function decodeU32(buf: Uint8Array, offset?: number): number; declare function concat(...parts: Uint8Array[]): Uint8Array; /** Encode a batch of frames as [u32 len][frame][u32 len][frame]... using the shared u32 codec. */ declare function encodeLengthPrefixedFrames(frames: Uint8Array[]): Uint8Array; declare function encodeLengthPrefixedFrames(frames: T[], getFrame: (entry: T) => Uint8Array): Uint8Array; /** Shared by Telefunc binary uploads and SSE requests: [u32 metadata length][metadata UTF-8][parts...] */ declare function encodeRequestEnvelope(metadataSerialized: string, parts: RequestEnvelopePart[]): Blob; /** Encode a string as `[u32 BE byte length][UTF-8 bytes]`. */ declare function encodeLengthPrefixedString(s: string): Uint8Array; /** Read a `[u32 BE byte length][UTF-8 bytes]` string at `offset`. * Returns the string and the offset of the first byte past it. */ declare function readLengthPrefixedString(bytes: Uint8Array, offset: number): { value: string; offsetAfter: number; }; declare function encodeIndexedFrame(index: number, payload: Uint8Array): Uint8Array; /** Decode the body of an indexed frame (after the 4-byte length prefix has been read). */ declare function decodeIndexedFrame(frameBody: Uint8Array): { index: number; payload: Uint8Array; };