/**
 * Utility class for readable data stream using Web ReadableStream API.
 */
export declare class DataStream {
    /**
     * Reads the entire readable stream given into array of bytes.
     * @throws TypeError if `readableStream` is null or undefined.
     */
    static toBytes(readableStream: ReadableStream<Uint8Array>): Promise<Uint8Array>;
    /**
     * Reads the entire readable stream and JSON parses it into an object.
     */
    static toObject(readableStream: ReadableStream<Uint8Array>): Promise<object>;
    /**
     * Concatenates the array of bytes given into one Uint8Array.
     */
    private static concatenateArrayOfBytes;
    /**
     * Creates a readable stream from the bytes given.
     */
    static fromBytes(bytes: Uint8Array): ReadableStream<Uint8Array>;
    /**
     * Creates a readable stream from the object given.
     */
    static fromObject(object: Record<string, any>): ReadableStream<Uint8Array>;
    /**
     * Adapts a Web ReadableStream into an AsyncIterable for compatibility with libraries
     * like `ipfs-unixfs-importer` that expect `AsyncIterable<Uint8Array>`.
     * @throws TypeError if `stream` is null or undefined.
     */
    static asAsyncIterable(stream: ReadableStream<Uint8Array>): AsyncIterable<Uint8Array>;
    /**
     * Duplicates the given data stream into the number of streams specified so that multiple handlers can consume the same data stream.
     * Uses the native `ReadableStream.tee()` method for 2 copies, or a custom fan-out for N copies.
     */
    static duplicateDataStream(dataStream: ReadableStream<Uint8Array>, count: number): ReadableStream<Uint8Array>[];
}
//# sourceMappingURL=data-stream.d.ts.map