import type { ArchiveSource } from "./io/archive-source.js"; import { TarReader } from "./tar/tar-archive.js"; import { ZipReader, type UnzipOptionsTar, type UnzipOptionsZip } from "./unzip/zip-reader.js"; /** * Open an archive for reading * * @param source - Archive data source * @param options - Options including format * @returns ZipReader or TarReader depending on format option * * @example * ```ts * // Read ZIP archive (default) * const zipReader = unzip(zipBytes); * for await (const entry of zipReader.entries()) { * console.log(entry.path); * } * * // Read TAR archive * const tarReader = unzip(tarBytes, { format: "tar" }); * for await (const entry of tarReader.entries()) { * console.log(entry.path); * } * ``` */ export declare function unzip(source: ArchiveSource, options: UnzipOptionsTar): TarReader; export declare function unzip(source: ArchiveSource, options?: UnzipOptionsZip): ZipReader;