/**
 * Simple ZIP extraction utilities
 * Provides easy-to-use Promise-based API for extracting ZIP files
 * Works in both Node.js and browser environments
 */
import { type ZipEntryInfo } from "@archive/unzip/zip-parser";
/**
 * Extracted file entry
 */
export interface ExtractedFile {
    /** File path within the ZIP */
    path: string;
    /** File content as Uint8Array */
    data: Uint8Array;
    /** Whether this is a directory */
    isDirectory: boolean;
    /** Uncompressed size */
    size: number;
}
/**
 * Extract all files from a ZIP buffer
 *
 * @param zipData - ZIP file data as Buffer, Uint8Array, or ArrayBuffer
 * @returns Map of file paths to their content
 *
 * @example
 * ```ts
 * import { extractAll } from "./utils/unzip/extract";
 *
 * const zipData = fs.readFileSync("archive.zip");
 * const files = await extractAll(zipData);
 *
 * for (const [path, file] of files) {
 *   console.log(`${path}: ${file.data.length} bytes`);
 * }
 * ```
 */
export declare function extractAll(zipData: Uint8Array | ArrayBuffer): Promise<Map<string, ExtractedFile>>;
/**
 * Extract a single file from a ZIP buffer
 *
 * @param zipData - ZIP file data as Buffer, Uint8Array, or ArrayBuffer
 * @param filePath - Path of the file to extract
 * @returns File content as Uint8Array, or null if not found
 *
 * @example
 * ```ts
 * import { extractFile } from "./utils/unzip/extract";
 *
 * const zipData = fs.readFileSync("archive.zip");
 * const content = await extractFile(zipData, "readme.txt");
 * if (content) {
 *   console.log(new TextDecoder().decode(content));
 * }
 * ```
 */
export declare function extractFile(zipData: Uint8Array | ArrayBuffer, filePath: string): Promise<Uint8Array | null>;
/**
 * List all file paths in a ZIP buffer (without extracting content)
 *
 * @param zipData - ZIP file data as Buffer, Uint8Array, or ArrayBuffer
 * @returns Array of file paths
 *
 * @example
 * ```ts
 * import { listFiles } from "./utils/unzip/extract";
 *
 * const zipData = fs.readFileSync("archive.zip");
 * const paths = await listFiles(zipData);
 * console.log(paths); // ["file1.txt", "folder/file2.txt", ...]
 * ```
 */
export declare function listFiles(zipData: Uint8Array | ArrayBuffer): Promise<string[]>;
/**
 * Iterate over ZIP entries with a callback (memory efficient for large ZIPs)
 *
 * @param zipData - ZIP file data as Buffer, Uint8Array, or ArrayBuffer
 * @param callback - Async callback for each entry, return false to stop iteration
 *
 * @example
 * ```ts
 * import { forEachEntry } from "./utils/unzip/extract";
 *
 * await forEachEntry(zipData, async (path, getData) => {
 *   if (path.endsWith(".xml")) {
 *     const content = await getData();
 *     console.log(new TextDecoder().decode(content));
 *   }
 *   return true; // continue iteration
 * });
 * ```
 */
export declare function forEachEntry(zipData: Uint8Array | ArrayBuffer, callback: (path: string, getData: () => Promise<Uint8Array>, entry: ZipEntryInfo) => Promise<boolean | void>): Promise<void>;
export { ZipParser, type ZipEntryInfo, type ZipParseOptions } from "@archive/unzip/zip-parser";
