export declare const MAX_DECOMPRESSED_BLOCK_SIZE: number; /** True if using native lz4-napi, false if using WASM */ export declare let usingNativeLz4: boolean; /** True if using native zstd-napi, false if using WASM */ export declare let usingNativeZstd: boolean; export declare function init(): Promise; export declare function concat(arrays: Uint8Array[]): Uint8Array; export declare function readUInt32LE(arr: Uint8Array, offset: number): number; export declare function writeUInt32LE(arr: Uint8Array, value: number, offset: number): void; export declare const Method: { readonly None: 2; readonly LZ4: 130; readonly ZSTD: 144; }; export type MethodCode = (typeof Method)[keyof typeof Method]; export type Compression = false | "lz4" | "zstd" | { method: "zstd"; level?: number; }; export declare function toMethodCode(compression: Compression): MethodCode; /** ZSTD compression level, defined only for the `{ method: "zstd", level }` form. */ export declare function compressionLevel(compression: Compression): number | undefined; export declare function cityHash128LE(bytes: Uint8Array): Uint8Array; /** * Raw LZ4 block compression (no ClickHouse block wrapper, no frame headers). * Used internally for ClickHouse native block format. */ export declare function lz4CompressRaw(raw: Uint8Array): Uint8Array; /** * LZ4 frame compression for HTTP Content-Encoding. * Produces standard LZ4 frame format with magic number and checksums. * Only available with lz4-napi (Node.js), not in WASM builds. */ export declare function lz4CompressFrame(raw: Uint8Array): Uint8Array; /** * Raw ZSTD compression (no ClickHouse block wrapper). * Use for HTTP Content-Encoding compression. */ export declare function zstdCompressRaw(raw: Uint8Array, level?: number): Uint8Array; /** * Encode a block with ClickHouse native compression format. * @param raw - Uncompressed data * @param compression - Compression method; the `{ method: "zstd", level }` form carries a ZSTD level * @returns Compressed block with checksum header */ export declare function encodeBlock(raw: Uint8Array, compression?: Compression): Uint8Array; /** Calculate required buffer size for encodeBlock output */ export declare function decodeBlock(block: Uint8Array): Uint8Array; export declare function decodeBlocks(data: Uint8Array): Uint8Array; //# sourceMappingURL=compression.d.ts.map