///
///
import { Buffer } from 'buffer';
import { ZipFileMeta } from './defintions';
/**
* Unzip all files in zip archive and return a map with the filename as a key and the file content as a value
* @param data
*/
export declare function unzipFiles(data: Uint8Array): Promise>;
interface OutputByType {
base64: string;
text: string;
binarystring: string;
array: number[];
uint8array: Uint8Array;
arraybuffer: ArrayBuffer;
blob: Blob;
nodebuffer: Buffer;
}
type OutputType = keyof OutputByType;
/**
* Zip utility class
* Can extract files from a zip archive
* Or build a zip archive by adding files
*
*/
export declare class Zip {
private zip;
private constructor();
/**
* Create a new Zip utility instance
*/
static createNew(): Zip;
/**
* Ceate Zip instance from zip data buffer
* @param data
*/
static loadZip(data: Buffer | Uint8Array | Blob): Promise;
/**
* Add file to Zip
* @param filename file name
* @param content file content
*/
putFile(filename: string, content: string | Buffer | Uint8Array): this;
/**
* Generate zip
*/
generate(): Promise;
/**
*
* @param name
*/
hasFile(name: string): boolean;
/**
* Extract file by name from current zip
* @param name file name
* @param encoding file encoding
*
* @throws if file does not exist
*/
getFile(name: string, encoding: T): Promise;
getFilesMeta(): ZipFileMeta[];
/**
* @deprecated use `getFile()` instead. Will be removed in v2.0.0 and above
*/
file(name: string, encoding: T): Promise;
}
export {};