///
///
/**
* @module @xmcl/unzip
*/
import { Readable } from 'stream';
import { Entry, ZipFile, ZipFileOptions, Options } from 'yauzl';
export type OpenTarget = string | Buffer | number;
/**
* Open a yauzl zip
* @param target The zip path or buffer or file descriptor
* @param options The option to open
*/
export declare function open(target: OpenTarget, options?: Options): Promise;
/**
* Open the entry readstream for the zip file
* @param zip The zip file object
* @param entry The entry to open
* @param options The options to open stream
*/
export declare function openEntryReadStream(zip: ZipFile, entry: Entry, options?: ZipFileOptions): Promise;
/**
* Read the entry to buffer
* @param zip The zip file object
* @param entry The entry to open
* @param options The options to open stream
*/
export declare function readEntry(zip: ZipFile, entry: Entry, options?: ZipFileOptions): Promise;
/**
* Get the async entry generator for the zip file
* @param zip The zip file
*/
export declare function walkEntriesGenerator(zip: ZipFile): AsyncGenerator;
/**
* Walk all the entries of the zip and once provided entries are all found, then terminate the walk process
* @param zip The zip file
* @param entries The entry to read
*/
export declare function filterEntries(zip: ZipFile, entries: Array boolean)>): Promise<(Entry | undefined)[]>;
/**
* Walk all the entries of a unread zip file
* @param zip The unread zip file
* @param entryHandler The handler to recieve entries. Return true or Promise to stop the walk
*/
export declare function walkEntries(zip: ZipFile, entryHandler: (entry: Entry) => Promise | boolean | void): Promise;
export declare function getEntriesRecord(entries: Entry[]): Record;
/**
* Walk all entries of the zip file
* @param zipFile The zip file object
*/
export declare function readAllEntries(zipFile: ZipFile): Promise;
//# sourceMappingURL=index.d.ts.map