zstd-wasm-vn 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundler/zstd_wasm_vn.d.ts +86 -75
- package/bundler/zstd_wasm_vn.js +5 -1
- package/bundler/zstd_wasm_vn_bg.js +230 -229
- package/bundler/zstd_wasm_vn_bg.wasm +0 -0
- package/bundler/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/deno/zstd_wasm_vn.d.ts +86 -75
- package/deno/zstd_wasm_vn.js +227 -219
- package/deno/zstd_wasm_vn_bg.wasm +0 -0
- package/deno/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/esm/zstd_wasm_vn.d.ts +86 -75
- package/esm/zstd_wasm_vn.js +444 -10
- package/esm/zstd_wasm_vn_bg.wasm +0 -0
- package/esm/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/module/zstd_wasm_vn.d.ts +86 -75
- package/module/zstd_wasm_vn.js +227 -220
- package/module/zstd_wasm_vn_bg.wasm +0 -0
- package/module/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/no-modules/zstd_wasm_vn.d.ts +170 -159
- package/no-modules/zstd_wasm_vn.js +269 -275
- package/no-modules/zstd_wasm_vn_bg.wasm +0 -0
- package/no-modules/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/nodejs/zstd_wasm_vn.d.ts +86 -75
- package/nodejs/zstd_wasm_vn.js +243 -233
- package/nodejs/zstd_wasm_vn_bg.wasm +0 -0
- package/nodejs/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/package.json +1 -1
- package/web/zstd_wasm_vn.d.ts +139 -126
- package/web/zstd_wasm_vn.js +269 -273
- package/web/zstd_wasm_vn_bg.wasm +0 -0
- package/web/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/esm/zstd_wasm_vn_bg.js +0 -438
|
@@ -1,168 +1,179 @@
|
|
|
1
1
|
declare namespace wasm_bindgen {
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Streaming decompression for large data
|
|
98
|
-
*/
|
|
99
|
-
export class ZstdDecompressor {
|
|
100
|
-
free(): void;
|
|
101
|
-
[Symbol.dispose](): void;
|
|
102
|
-
/**
|
|
103
|
-
* Creates a new streaming decompressor
|
|
104
|
-
*/
|
|
105
|
-
constructor(compressed_data: Uint8Array);
|
|
106
|
-
/**
|
|
107
|
-
* Decompresses a chunk of data
|
|
108
|
-
*/
|
|
109
|
-
decompress_chunk(max_output_size: number): Uint8Array;
|
|
110
|
-
/**
|
|
111
|
-
* Decompresses all remaining data and consumes the decoder.
|
|
112
|
-
*/
|
|
113
|
-
finalize(): Uint8Array;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
}
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ZSTD compression and decompression for WebAssembly
|
|
7
|
+
*/
|
|
8
|
+
export class Zstd {
|
|
9
|
+
private constructor();
|
|
10
|
+
free(): void;
|
|
11
|
+
[Symbol.dispose](): void;
|
|
12
|
+
static compress(data: Uint8Array, level?: number | null): Uint8Array;
|
|
13
|
+
/**
|
|
14
|
+
* Estimates the compressed size for planning purposes
|
|
15
|
+
*/
|
|
16
|
+
static compressBound(input_size: number): number;
|
|
17
|
+
static compress_with_dict(data: Uint8Array, dict: Uint8Array, level?: number | null): Uint8Array;
|
|
18
|
+
/**
|
|
19
|
+
* Calculates compression ratio (smaller = better compression)
|
|
20
|
+
*/
|
|
21
|
+
static compressionRatio(original_size: number, compressed_size: number): number;
|
|
22
|
+
static decompress(compressed_data: Uint8Array): Uint8Array;
|
|
23
|
+
static decompress_with_dict(compressed_data: Uint8Array, dict: Uint8Array): Uint8Array;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the recommended default compression level
|
|
26
|
+
*/
|
|
27
|
+
static defaultCompressionLevel(): number;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the maximum compression level
|
|
30
|
+
*/
|
|
31
|
+
static maxCompressionLevel(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the minimum compression level
|
|
34
|
+
*/
|
|
35
|
+
static minCompressionLevel(): number;
|
|
36
|
+
/**
|
|
37
|
+
* Calculates space savings percentage
|
|
38
|
+
*/
|
|
39
|
+
static spaceSavings(original_size: number, compressed_size: number): number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* ==================================== [Streaming] ====================================
|
|
44
|
+
* Streaming compression for large data
|
|
45
|
+
*/
|
|
46
|
+
export class ZstdCompressor {
|
|
47
|
+
free(): void;
|
|
48
|
+
[Symbol.dispose](): void;
|
|
49
|
+
/**
|
|
50
|
+
* Compresses a chunk of data
|
|
51
|
+
*/
|
|
52
|
+
compress_chunk(data: Uint8Array): void;
|
|
53
|
+
/**
|
|
54
|
+
* Finalizes compression and returns the compressed data
|
|
55
|
+
*/
|
|
56
|
+
finalize(): Uint8Array;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a new streaming compressor
|
|
59
|
+
*/
|
|
60
|
+
constructor(level?: number | null);
|
|
61
|
+
/**
|
|
62
|
+
* Flush the internal buffer to get compressed data for this chunk
|
|
63
|
+
*/
|
|
64
|
+
split_off_chunk(at: number): Uint8Array;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Streaming decompression for large data
|
|
69
|
+
*/
|
|
70
|
+
export class ZstdDecompressor {
|
|
71
|
+
free(): void;
|
|
72
|
+
[Symbol.dispose](): void;
|
|
73
|
+
/**
|
|
74
|
+
* Decompresses a chunk of data
|
|
75
|
+
*/
|
|
76
|
+
decompress_chunk(max_output_size: number): Uint8Array;
|
|
77
|
+
/**
|
|
78
|
+
* Decompresses all remaining data and consumes the decoder.
|
|
79
|
+
*/
|
|
80
|
+
finalize(): Uint8Array;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a new streaming decompressor
|
|
83
|
+
*/
|
|
84
|
+
constructor(compressed_data: Uint8Array);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Compresses data using Zstandard compression
|
|
89
|
+
*
|
|
90
|
+
* # Arguments
|
|
91
|
+
*
|
|
92
|
+
* * `data` - Input data to compress
|
|
93
|
+
* * `level` - Compression level (1-22, default 6). Higher = better compression but slower
|
|
94
|
+
*/
|
|
95
|
+
export function compress(data: Uint8Array, level?: number | null): Uint8Array;
|
|
117
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Compresses data using Zstandard compression with a dictionary
|
|
99
|
+
*
|
|
100
|
+
* # Arguments
|
|
101
|
+
*
|
|
102
|
+
* * `data` - Input data to compress
|
|
103
|
+
* * `dict` - The compression dictionary
|
|
104
|
+
* * `level` - Compression level (1-22, default 6). Higher = better compression but slower
|
|
105
|
+
*/
|
|
106
|
+
export function compress_with_dict(data: Uint8Array, dict: Uint8Array, level?: number | null): Uint8Array;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Decompresses Zstandard compressed data
|
|
110
|
+
*
|
|
111
|
+
* # Arguments
|
|
112
|
+
*
|
|
113
|
+
* * `compressed_data` - Zstandard compressed data
|
|
114
|
+
*/
|
|
115
|
+
export function decompress(compressed_data: Uint8Array): Uint8Array;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Decompresses Zstandard compressed data using a dictionary
|
|
119
|
+
*
|
|
120
|
+
* # Arguments
|
|
121
|
+
*
|
|
122
|
+
* * `data` - Zstandard compressed data
|
|
123
|
+
* * `dict` - The decompression dictionary (must match the compression dictionary)
|
|
124
|
+
*/
|
|
125
|
+
export function decompress_with_dict(data: Uint8Array, dict: Uint8Array): Uint8Array;
|
|
126
|
+
|
|
127
|
+
}
|
|
118
128
|
declare type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
119
129
|
|
|
120
130
|
declare interface InitOutput {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
131
|
+
readonly memory: WebAssembly.Memory;
|
|
132
|
+
readonly __wbg_zstd_free: (a: number, b: number) => void;
|
|
133
|
+
readonly __wbg_zstdcompressor_free: (a: number, b: number) => void;
|
|
134
|
+
readonly __wbg_zstddecompressor_free: (a: number, b: number) => void;
|
|
135
|
+
readonly compress: (a: number, b: number, c: number) => [number, number, number, number];
|
|
136
|
+
readonly compress_with_dict: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
137
|
+
readonly decompress: (a: number, b: number) => [number, number, number, number];
|
|
138
|
+
readonly decompress_with_dict: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
139
|
+
readonly zstd_compress: (a: number, b: number, c: number) => [number, number, number, number];
|
|
140
|
+
readonly zstd_compressBound: (a: number) => number;
|
|
141
|
+
readonly zstd_compress_with_dict: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
142
|
+
readonly zstd_compressionRatio: (a: number, b: number) => number;
|
|
143
|
+
readonly zstd_decompress: (a: number, b: number) => [number, number, number, number];
|
|
144
|
+
readonly zstd_decompress_with_dict: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
145
|
+
readonly zstd_defaultCompressionLevel: () => number;
|
|
146
|
+
readonly zstd_maxCompressionLevel: () => number;
|
|
147
|
+
readonly zstd_minCompressionLevel: () => number;
|
|
148
|
+
readonly zstd_spaceSavings: (a: number, b: number) => number;
|
|
149
|
+
readonly zstdcompressor_compress_chunk: (a: number, b: number, c: number) => [number, number];
|
|
150
|
+
readonly zstdcompressor_finalize: (a: number) => [number, number, number, number];
|
|
151
|
+
readonly zstdcompressor_new: (a: number) => [number, number, number];
|
|
152
|
+
readonly zstdcompressor_split_off_chunk: (a: number, b: number) => [number, number, number, number];
|
|
153
|
+
readonly zstddecompressor_decompress_chunk: (a: number, b: number) => [number, number, number, number];
|
|
154
|
+
readonly zstddecompressor_finalize: (a: number) => [number, number, number, number];
|
|
155
|
+
readonly zstddecompressor_new: (a: number, b: number) => [number, number, number];
|
|
156
|
+
readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
|
|
157
|
+
readonly rust_zstd_wasm_shim_free: (a: number) => void;
|
|
158
|
+
readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
|
|
159
|
+
readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
|
|
160
|
+
readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
|
|
161
|
+
readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
|
|
162
|
+
readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
|
|
163
|
+
readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
|
|
164
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
165
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
166
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
167
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
168
|
+
readonly __wbindgen_start: () => void;
|
|
158
169
|
}
|
|
159
170
|
|
|
160
171
|
/**
|
|
161
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
162
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
163
|
-
*
|
|
164
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
165
|
-
*
|
|
166
|
-
* @returns {Promise<InitOutput>}
|
|
167
|
-
*/
|
|
172
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
173
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
174
|
+
*
|
|
175
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
176
|
+
*
|
|
177
|
+
* @returns {Promise<InitOutput>}
|
|
178
|
+
*/
|
|
168
179
|
declare function wasm_bindgen (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|