/**
 * Stream Utilities
 *
 * Small, cross-platform helpers built on top of the platform stream
 * implementation selected by `./streams` (Node.js or browser).
 */
import type { IReadable, ITransform } from "./types.js";
export declare function collect<T>(stream: {
    [Symbol.asyncIterator](): AsyncIterator<T>;
}): Promise<T[]>;
export declare function text(stream: {
    [Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
}): Promise<string>;
export declare function json<T = unknown>(stream: {
    [Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
}): Promise<T>;
export declare function bytes(stream: {
    [Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
}): Promise<Uint8Array>;
export declare function fromString(str: string): IReadable<Uint8Array>;
export declare function fromJSON(data: unknown): IReadable<Uint8Array>;
export declare function fromBytes(data: Uint8Array): IReadable<Uint8Array>;
export declare function transform<TIn = Uint8Array, TOut = TIn>(fn: (chunk: TIn) => TOut | Promise<TOut>): ITransform<TIn, TOut>;
export declare function filter<T>(predicate: (chunk: T) => boolean | Promise<boolean>): ITransform<T, T>;
