/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { Transform, type TransformCallback } from 'node:stream';
/** Compressor class */
declare class _Compressor {
    /** constructor */
    constructor(level: number);
    /** compress */
    data(data: Buffer, callback: (data: Buffer) => void): void;
    /** end */
    end(callback: (data: Buffer) => void): void;
}
/** Decompressor class */
declare class _Decompressor {
    /** constructor */
    constructor();
    /** decompress */
    data(data: Buffer, callback: (data: Buffer) => void): void;
    /** end */
    end(callback: (data: Buffer) => void): void;
}
/** node bindings */
interface Binding {
    /** compress */
    compress(data: Buffer, level: number): Buffer;
    /** decompress */
    decompress(data: Buffer, maxSize: number): Buffer;
    /** Get zstd version */
    version: string;
    /** min compress level */
    minLevel: number;
    /** max compress level */
    maxLevel: number;
    /** default compress level */
    defaultLevel: number;
    /** recommended size for input buffer */
    compressInputLength: number;
    /** recommended size for output buffer */
    compressOutputLength: number;
    /** recommended size for input buffer */
    decompressInputLength: number;
    /** recommended size for output buffer */
    decompressOutputLength: number;
    /** Compressor class */
    Compressor: typeof _Compressor;
    /** Decompressor class */
    Decompressor: typeof _Decompressor;
}
export declare const compress: (data: BinaryData, level?: number | undefined) => Uint8Array, decompress: (data: BinaryData) => Uint8Array;
/** NodeJs Transform stream Compressor */
export declare class Compressor extends Transform {
    private _binding?;
    private readonly _level;
    constructor(level?: number);
    /** @inheritdoc */
    _construct(callback: (error?: Error | null | undefined) => void): void;
    /** @inheritdoc */
    _transform(chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback): void;
    /** @inheritdoc */
    _flush(callback: TransformCallback): void;
    /** @inheritdoc */
    _destroy(error: Error | null, callback: (error: Error | null) => void): void;
}
/** NodeJs Transform stream Decompressor */
export declare class Decompressor extends Transform {
    private _binding?;
    constructor();
    /** @inheritdoc */
    _construct(callback: (error?: Error | null | undefined) => void): void;
    /** @inheritdoc */
    _transform(chunk: Buffer, encoding: BufferEncoding, callback: TransformCallback): void;
    /** @inheritdoc */
    _flush(callback: TransformCallback): void;
    /** @inheritdoc */
    _destroy(error: Error | null, callback: (error: Error | null) => void): void;
}
export declare const ZSTD_VERSION: () => string;
export declare const TYPE = "napi";
export declare const _NapiBindings: Binding;
declare const _default: null;
export default _default;
