generated from napi-rs/package-template
/
index.d.ts
38 lines (25 loc) · 1.32 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* auto-generated by NAPI-RS */
/* eslint-disable */
export function compress(input: string | Buffer, options?: EncOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<Buffer>
export function compressSync(input: string | Buffer, options?: EncOptions | undefined | null): Buffer
export interface DecOptions {
asBuffer?: boolean
/**
* do not use `create_external_buffer` to create the output buffer
* set this option to `true` will make the API slower
* for compatibility with electron >= 21
* see https://www.electronjs.org/blog/v8-memory-cage and https://github.com/electron/electron/issues/35801#issuecomment-1261206333
*/
copyOutputData?: boolean
}
export interface EncOptions {
/**
* do not use `create_external_buffer` to create the output buffer
* for compatibility with electron >= 21
* set this option to `true` will make the API slower
* see https://www.electronjs.org/blog/v8-memory-cage and https://github.com/electron/electron/issues/35801#issuecomment-1261206333
*/
copyOutputData?: boolean
}
export function uncompress(input: string | Buffer, options?: DecOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<string | Buffer>
export function uncompressSync(input: string | Buffer, options?: DecOptions | undefined | null): string | Buffer