import wasmModule, { type Ptr, type Module as WasmModule } from '../../prebuilds/zstd.js';
export declare let Module: WasmModule;
export declare const ModuleReady: Promise<void>;
/** Set callbacks for wasm module */
export declare function setWasmCallbacks(callbacks: Parameters<typeof wasmModule>[0]): void;
/** Convert to uint */
export declare function uint(value: number): number;
/** Copy data from heap */
export declare function fromHeap(ptr: Ptr, size: number): Uint8Array<ArrayBuffer>;
/** Helper class */
export declare class Helper {
    /** Warp malloc to throw error */
    malloc(size: number): Ptr;
    /** Copy data to heap */
    toHeap(data: Uint8Array): Ptr;
    private allocated;
    /** finalize */
    finalize(): void;
}
/** check zstd error */
export declare function checkError<T extends number>(code: T): T;
export declare const ZSTD_VERSION: () => string;
/** compress */
export declare function compress(buf: Uint8Array, level: number): Uint8Array<ArrayBuffer>;
/** decompress */
export declare function decompress(buf: Uint8Array): Uint8Array<ArrayBuffer>;
//# sourceMappingURL=common.d.ts.map