import { Uint8ArrayLike } from '../ipfs';
type ResultWithMime = {
    result: Uint8ArrayLike;
    mime: string | undefined;
    firstChunk: Uint8Array | undefined;
};
type StreamDoneCallback = (chunks: Array<Uint8Array>, mime: string | undefined) => Promise<void> | void;
export declare const getMimeFromUint8Array: (raw: Uint8Array | undefined) => Promise<string | undefined>;
export declare function toAsyncIterableWithMime(stream: ReadableStream<Uint8Array>, flush?: StreamDoneCallback): Promise<ResultWithMime>;
export declare function toReadableStreamWithMime(stream: ReadableStream<Uint8Array>, flush?: StreamDoneCallback): Promise<ResultWithMime>;
export type onProgressCallback = (progress: number) => void;
export declare const getResponseResult: (response: Uint8ArrayLike, onProgress?: onProgressCallback) => Promise<Uint8Array>;
export {};
