UNPKG

@cmtlyt/string-zip

Version:
15 lines (11 loc) 914 B
import { TExclude, createWorkerFunc } from '@cmtlyt/base'; declare function zipSync(source: string, keyLength?: number): string; declare const zip: (source: string, keyLength?: number | undefined) => Promise<string>; declare function unzipSync(zipSource: string): string; declare const unzip: (zipSource: string) => Promise<string>; type CreateWorkerFuncOptions = Required<Parameters<typeof createWorkerFunc>>[2]; declare function createZip(options: TExclude<CreateWorkerFuncOptions, 'needPost'>): (source: string, keyLength?: number | undefined) => Promise<string>; declare function createUnzip(options: TExclude<CreateWorkerFuncOptions, 'needPost'>): (zipSource: string) => Promise<string>; declare function gzip(source: string, keyLength?: number): Promise<string>; declare function unGzip(zipSource: string): Promise<string>; export { createUnzip, createZip, gzip, unGzip, unzip, unzipSync, zip, zipSync };