import { type BufferSource } from '../common.js';
import type { WorkerRequest } from './worker.js';
/** cleanup all workers */
export declare function terminate(): void;
/** get current worker status */
export declare function workers(): {
    idle: number;
    busy: number;
};
/** Proxy to worker */
declare abstract class TransformProxy implements Transformer<BufferSource, Uint8Array<ArrayBuffer>> {
    protected readonly method: WorkerRequest[1];
    protected readonly args: WorkerRequest[2];
    constructor(method: WorkerRequest[1], args: WorkerRequest[2]);
    protected ctx: Worker | null;
    protected controller: TransformStreamDefaultController<Uint8Array<ArrayBuffer>>;
    /** receive from worker */
    private readonly onMessage;
    /** end transform */
    protected end(error: unknown): void;
    /** @inheritdoc */
    start(controller: TransformStreamDefaultController<Uint8Array<ArrayBuffer>>): Promise<void>;
    /** @inheritdoc */
    transform(chunk: BufferSource): void;
    /** @inheritdoc */
    flush(): Promise<void>;
}
/** Stream compressor */
export declare class WebCompressor extends TransformProxy {
    readonly level: number;
    constructor(level: number);
}
/** Stream compressor */
export declare class WebDecompressor extends TransformProxy {
    constructor();
}
export declare const compressSync: (data: BufferSource, level?: number) => Uint8Array<ArrayBuffer>, compress: (data: BufferSource | Blob, level?: number) => Promise<Uint8Array<ArrayBuffer>>, decompressSync: (data: BufferSource) => Uint8Array<ArrayBuffer>, decompress: (data: BufferSource | Blob) => Promise<Uint8Array<ArrayBuffer>>, compressor: (level?: number) => TransformStream<BufferSource, Uint8Array<ArrayBuffer>>, decompressor: () => TransformStream<BufferSource, Uint8Array<ArrayBuffer>>;
export declare const ZSTD_VERSION: () => string;
export declare const TYPE = "wasm";
/** For debug usage */
export declare const _WasmModule: import("../../prebuilds/zstd.js").Module;
declare const _default: null;
export default _default;
//# sourceMappingURL=index.d.ts.map