/**
 * Shared Utilities
 *
 * Common utilities shared across all stream implementations.
 * This module provides cached TextEncoder/TextDecoder instances
 * and core binary operations.
 */
/**
 * Cached TextEncoder instance for UTF-8 encoding
 */
export declare const textEncoder: TextEncoder;
/**
 * Cached TextDecoder instance for UTF-8 decoding
 * ignoreBOM: true - preserves BOM in output to match Node.js behavior
 */
export declare const textDecoder: TextDecoder;
/**
 * Get a cached TextDecoder instance.
 *
 * Note: For the default UTF-8 path we reuse the module-level `textDecoder`.
 */
export declare function getTextDecoder(encoding?: string): TextDecoder;
/**
 * Convert string to Uint8Array using cached encoder
 */
export declare function stringToUint8Array(str: string): Uint8Array;
/**
 * Convert Uint8Array to string using cached decoder
 */
export declare function uint8ArrayToString(arr: Uint8Array, encoding?: string): string;
/**
 * Concatenate multiple Uint8Arrays efficiently
 */
export declare function concatUint8Arrays(arrays: readonly Uint8Array[], totalLength?: number): Uint8Array;
/**
 * Compare two Uint8Arrays for equality
 */
export declare function uint8ArrayEquals(a: Uint8Array, b: Uint8Array): boolean;
/**
 * Find pattern in Uint8Array
 */
export declare function uint8ArrayIndexOf(haystack: Uint8Array, needle: Uint8Array, start?: number): number;
/**
 * Slice Uint8Array (returns a copy)
 */
export declare function uint8ArraySlice(arr: Uint8Array, start?: number, end?: number): Uint8Array;
/**
 * Convert any buffer-like input to Uint8Array
 */
export declare function toUint8Array(input: string | Uint8Array | ArrayBuffer | number[]): Uint8Array;
/**
 * Convert any input to string
 */
export declare function bufferToString(input: string | Uint8Array | ArrayBuffer | number[], encoding?: string): string;
