/**
 * @file Brotli compression / decompression — in-memory, file-to-file, and
 *   raw-stream variants. Default quality is 11 (max compression, slow) on the
 *   assumption these are one-shot CLI calls. Override via `options.level` for
 *   hot paths. await compressBrotli(JSON.stringify(payload)) await
 *   compressBrotliFile('input.json', 'input.json.br')
 *   readable.pipe(createBrotliCompressor()).pipe(writable)
 */
import { Buffer } from 'node:buffer';
import { type BrotliOptions } from 'node:zlib';
import type { CompressFileOptions, CompressOptions } from './types';
interface ResolvedBrotliOptions extends BrotliOptions {
    params: NonNullable<BrotliOptions['params']>;
}
/**
 * Translate `CompressOptions` into the `BrotliOptions` zlib expects. Defaults
 * `quality` to 11 (max) when not provided, and forwards a positive `size` hint.
 * Exposed for callers building their own zlib pipelines and for unit-test
 * coverage.
 */
export declare function resolveBrotliOptions(options: CompressOptions | undefined): ResolvedBrotliOptions;
/**
 * Compress a string or Buffer with brotli. Strings are encoded as UTF-8 before
 * compression — pass an explicit Buffer if you have non-UTF-8 input.
 */
export declare function compressBrotli(input: string | Buffer, options?: CompressOptions | undefined): Promise<Buffer>;
/**
 * Decompress a brotli-compressed Buffer.
 */
export declare function decompressBrotli(input: Buffer): Promise<Buffer>;
/**
 * Stream-compress a file with brotli. Two call shapes:
 *
 * CompressBrotliFile(src, dest, options?) Writes compressed output to `dest`.
 * Source is left intact.
 *
 * CompressBrotliFile(src, { inPlace: true, ...options }) Writes to `<src>.br`
 * and deletes `src` after the write succeeds. Returns the new path.
 *
 * Returns the destination path in both shapes — same string the caller passed
 * in or the computed `.br` path for inPlace.
 */
export declare function compressBrotliFile(srcPath: string, destPath: string, options?: CompressOptions | undefined): Promise<string>;
export declare function compressBrotliFile(srcPath: string, options: CompressFileOptions): Promise<string>;
/**
 * Stream-decompress a brotli file. Two call shapes:
 *
 * DecompressBrotliFile(src, dest) Writes decompressed output to `dest`. Source
 * is left intact.
 *
 * DecompressBrotliFile(src, { inPlace: true }) Strips the `.br`/`.brotli`
 * suffix to derive the destination, then deletes the compressed source after
 * the write succeeds. Throws if `src` has no recognizable extension.
 *
 * Returns the destination path in both shapes.
 */
export declare function decompressBrotliFile(srcPath: string, destPath: string): Promise<string>;
export declare function decompressBrotliFile(srcPath: string, options: CompressFileOptions): Promise<string>;
/**
 * Create a brotli compress transform stream. Compose into your own pipeline.
 * The `pipeline` from `node:stream/promises` is the safe way to wire it up — it
 * handles error propagation across all stages.
 */
export declare function createBrotliCompressor(options?: CompressOptions | undefined): import("zlib").BrotliCompress;
/**
 * Create a brotli decompress transform stream.
 */
export declare function createBrotliDecompressor(): import("zlib").BrotliDecompress;
/**
 * Cheap pre-flight check: does the buffer look like it could be brotli? Returns
 * false for inputs too short to be valid. Brotli has no fixed magic bytes, so
 * this is intentionally permissive — the authoritative test is
 * `decompressBrotli(buf)` succeeding. Use for UI hints, not correctness.
 */
export declare function isBrotliCompressed(input: Buffer): boolean;
export declare const BROTLI_EXTS: ReadonlySet<string>;
/**
 * Extension check for brotli paths — matches `.br` / `.brotli`
 * (case-insensitive). Naming follows node:path's `extname`.
 */
export declare function hasBrotliExt(filePath: string): boolean;
export {};
