UNPKG

xframelib

Version:

The accumulated front-end development foundation library originates from projects and serves projects.

28 lines (27 loc) 868 B
export interface IGzipFile { name: string; content: Uint8Array | string | ArrayBuffer; } /** * Gzip压缩解压 */ export default class GzipTool { static runningInBrowser(): boolean; static isGzipped(arg: any): boolean; static gzipSync(content: any, opts: any): Uint8Array<ArrayBuffer> | undefined; static gzipAsync(content: Uint8Array | string, opts: any): Promise<unknown>; /** * 直接读取压缩包文件,解压 * @param file File文件内容 * @returns */ static readGzipFromFile(file: File): Promise<IGzipFile[]>; /** * 读压缩包文件内容,解压 * @param gzipfile * @returns */ static readGzipFile(gzipfile: IGzipFile): IGzipFile[]; static gunzipAsync(buf: any, opts: any): Promise<any>; static gunzipSync(buf: any, filename: any): Uint8Array | string | any; }