import { ZipParser, type ZipEntryInfo } from "@archive/unzip/zip-parser";
import { type ParseOptions, type ZipEntry as ParseZipEntry } from "@archive/unzip/stream";
import { type ArchiveSink } from "@archive/io/archive-sink";
import { type ArchiveSource } from "@archive/io/archive-source";
export interface UnzipOptions {
    decodeStrings?: boolean;
    parse?: ParseOptions;
}
export declare class UnzipEntry {
    readonly path: string;
    readonly isDirectory: boolean;
    private readonly _info?;
    private readonly _parser?;
    private readonly _parseEntry?;
    constructor(args: {
        kind: "buffer";
        parser: ZipParser;
        info: ZipEntryInfo;
    } | {
        kind: "stream";
        entry: ParseZipEntry;
    });
    bytes(): Promise<Uint8Array>;
    stream(): AsyncIterable<Uint8Array>;
    pipeTo(sink: ArchiveSink): Promise<void>;
    text(encoding?: string): Promise<string>;
    discard(): void;
}
export declare class ZipReader {
    private readonly _source;
    private readonly _options;
    private _bufferParser;
    constructor(source: ArchiveSource, options?: UnzipOptions);
    private _ensureBufferParser;
    get(path: string): Promise<UnzipEntry | null>;
    entries(): AsyncIterable<UnzipEntry>;
    bytes(path: string): Promise<Uint8Array | null>;
    close(): Promise<void>;
}
export declare function unzip(source: ArchiveSource, options?: UnzipOptions): ZipReader;
