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.
@@ -1,163 +1,15 @@
1
- import source wasmModule from "./zstd_wasm_vn_bg.wasm";
2
-
3
- let wasm;
4
-
5
- let cachedUint8ArrayMemory0 = null;
6
-
7
- function getUint8ArrayMemory0() {
8
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
10
- }
11
- return cachedUint8ArrayMemory0;
12
- }
13
-
14
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
15
-
16
- cachedTextDecoder.decode();
17
-
18
- function decodeText(ptr, len) {
19
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
20
- }
21
-
22
- function getStringFromWasm0(ptr, len) {
23
- ptr = ptr >>> 0;
24
- return decodeText(ptr, len);
25
- }
26
-
27
- let WASM_VECTOR_LEN = 0;
28
-
29
- function passArray8ToWasm0(arg, malloc) {
30
- const ptr = malloc(arg.length * 1, 1) >>> 0;
31
- getUint8ArrayMemory0().set(arg, ptr / 1);
32
- WASM_VECTOR_LEN = arg.length;
33
- return ptr;
34
- }
35
-
36
- function isLikeNone(x) {
37
- return x === undefined || x === null;
38
- }
39
-
40
- function takeFromExternrefTable0(idx) {
41
- const value = wasm.__wbindgen_export_0.get(idx);
42
- wasm.__externref_table_dealloc(idx);
43
- return value;
44
- }
45
-
46
- function getArrayU8FromWasm0(ptr, len) {
47
- ptr = ptr >>> 0;
48
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
49
- }
50
- /**
51
- * Compresses data using Zstandard compression
52
- *
53
- * # Arguments
54
- *
55
- * * `data` - Input data to compress
56
- * * `level` - Compression level (1-22, default 6). Higher = better compression but slower
57
- * @param {Uint8Array} data
58
- * @param {number | null} [level]
59
- * @returns {Uint8Array}
60
- */
61
- export function compress(data, level) {
62
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
63
- const len0 = WASM_VECTOR_LEN;
64
- const ret = wasm.compress(ptr0, len0, isLikeNone(level) ? 0x100000001 : (level) >> 0);
65
- if (ret[3]) {
66
- throw takeFromExternrefTable0(ret[2]);
67
- }
68
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
69
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
70
- return v2;
71
- }
72
-
73
- /**
74
- * Compresses data using Zstandard compression with a dictionary
75
- *
76
- * # Arguments
77
- *
78
- * * `data` - Input data to compress
79
- * * `dict` - The compression dictionary
80
- * * `level` - Compression level (1-22, default 6). Higher = better compression but slower
81
- * @param {Uint8Array} data
82
- * @param {Uint8Array} dict
83
- * @param {number | null} [level]
84
- * @returns {Uint8Array}
85
- */
86
- export function compress_with_dict(data, dict, level) {
87
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
88
- const len0 = WASM_VECTOR_LEN;
89
- const ptr1 = passArray8ToWasm0(dict, wasm.__wbindgen_malloc);
90
- const len1 = WASM_VECTOR_LEN;
91
- const ret = wasm.compress_with_dict(ptr0, len0, ptr1, len1, isLikeNone(level) ? 0x100000001 : (level) >> 0);
92
- if (ret[3]) {
93
- throw takeFromExternrefTable0(ret[2]);
94
- }
95
- var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
96
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
97
- return v3;
98
- }
99
-
100
- /**
101
- * Decompresses Zstandard compressed data
102
- *
103
- * # Arguments
104
- *
105
- * * `compressed_data` - Zstandard compressed data
106
- * @param {Uint8Array} compressed_data
107
- * @returns {Uint8Array}
108
- */
109
- export function decompress(compressed_data) {
110
- const ptr0 = passArray8ToWasm0(compressed_data, wasm.__wbindgen_malloc);
111
- const len0 = WASM_VECTOR_LEN;
112
- const ret = wasm.decompress(ptr0, len0);
113
- if (ret[3]) {
114
- throw takeFromExternrefTable0(ret[2]);
115
- }
116
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
117
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
118
- return v2;
119
- }
120
-
121
- /**
122
- * Decompresses Zstandard compressed data using a dictionary
123
- *
124
- * # Arguments
125
- *
126
- * * `data` - Zstandard compressed data
127
- * * `dict` - The decompression dictionary (must match the compression dictionary)
128
- * @param {Uint8Array} data
129
- * @param {Uint8Array} dict
130
- * @returns {Uint8Array}
131
- */
132
- export function decompress_with_dict(data, dict) {
133
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
134
- const len0 = WASM_VECTOR_LEN;
135
- const ptr1 = passArray8ToWasm0(dict, wasm.__wbindgen_malloc);
136
- const len1 = WASM_VECTOR_LEN;
137
- const ret = wasm.decompress_with_dict(ptr0, len0, ptr1, len1);
138
- if (ret[3]) {
139
- throw takeFromExternrefTable0(ret[2]);
140
- }
141
- var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
142
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
143
- return v3;
144
- }
1
+ /* @ts-self-types="./zstd_wasm_vn.d.ts" */
145
2
 
146
- const ZstdFinalization = (typeof FinalizationRegistry === 'undefined')
147
- ? { register: () => {}, unregister: () => {} }
148
- : new FinalizationRegistry(ptr => wasm.__wbg_zstd_free(ptr >>> 0, 1));
149
3
  /**
150
4
  * ZSTD compression and decompression for WebAssembly
151
5
  */
152
6
  export class Zstd {
153
-
154
7
  __destroy_into_raw() {
155
8
  const ptr = this.__wbg_ptr;
156
9
  this.__wbg_ptr = 0;
157
10
  ZstdFinalization.unregister(this);
158
11
  return ptr;
159
12
  }
160
-
161
13
  free() {
162
14
  const ptr = this.__destroy_into_raw();
163
15
  wasm.__wbg_zstd_free(ptr, 0);
@@ -178,6 +30,15 @@ export class Zstd {
178
30
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
179
31
  return v2;
180
32
  }
33
+ /**
34
+ * Estimates the compressed size for planning purposes
35
+ * @param {number} input_size
36
+ * @returns {number}
37
+ */
38
+ static compressBound(input_size) {
39
+ const ret = wasm.zstd_compressBound(input_size);
40
+ return ret >>> 0;
41
+ }
181
42
  /**
182
43
  * @param {Uint8Array} data
183
44
  * @param {Uint8Array} dict
@@ -197,6 +58,16 @@ export class Zstd {
197
58
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
198
59
  return v3;
199
60
  }
61
+ /**
62
+ * Calculates compression ratio (smaller = better compression)
63
+ * @param {number} original_size
64
+ * @param {number} compressed_size
65
+ * @returns {number}
66
+ */
67
+ static compressionRatio(original_size, compressed_size) {
68
+ const ret = wasm.zstd_compressionRatio(original_size, compressed_size);
69
+ return ret;
70
+ }
200
71
  /**
201
72
  * @param {Uint8Array} compressed_data
202
73
  * @returns {Uint8Array}
@@ -238,14 +109,6 @@ export class Zstd {
238
109
  const ret = wasm.zstd_defaultCompressionLevel();
239
110
  return ret;
240
111
  }
241
- /**
242
- * Returns the minimum compression level
243
- * @returns {number}
244
- */
245
- static minCompressionLevel() {
246
- const ret = wasm.zstd_minCompressionLevel();
247
- return ret;
248
- }
249
112
  /**
250
113
  * Returns the maximum compression level
251
114
  * @returns {number}
@@ -255,22 +118,11 @@ export class Zstd {
255
118
  return ret;
256
119
  }
257
120
  /**
258
- * Estimates the compressed size for planning purposes
259
- * @param {number} input_size
260
- * @returns {number}
261
- */
262
- static compressBound(input_size) {
263
- const ret = wasm.zstd_compressBound(input_size);
264
- return ret >>> 0;
265
- }
266
- /**
267
- * Calculates compression ratio (smaller = better compression)
268
- * @param {number} original_size
269
- * @param {number} compressed_size
121
+ * Returns the minimum compression level
270
122
  * @returns {number}
271
123
  */
272
- static compressionRatio(original_size, compressed_size) {
273
- const ret = wasm.zstd_compressionRatio(original_size, compressed_size);
124
+ static minCompressionLevel() {
125
+ const ret = wasm.zstd_minCompressionLevel();
274
126
  return ret;
275
127
  }
276
128
  /**
@@ -286,39 +138,21 @@ export class Zstd {
286
138
  }
287
139
  if (Symbol.dispose) Zstd.prototype[Symbol.dispose] = Zstd.prototype.free;
288
140
 
289
- const ZstdCompressorFinalization = (typeof FinalizationRegistry === 'undefined')
290
- ? { register: () => {}, unregister: () => {} }
291
- : new FinalizationRegistry(ptr => wasm.__wbg_zstdcompressor_free(ptr >>> 0, 1));
292
141
  /**
293
142
  * ==================================== [Streaming] ====================================
294
143
  * Streaming compression for large data
295
144
  */
296
145
  export class ZstdCompressor {
297
-
298
146
  __destroy_into_raw() {
299
147
  const ptr = this.__wbg_ptr;
300
148
  this.__wbg_ptr = 0;
301
149
  ZstdCompressorFinalization.unregister(this);
302
150
  return ptr;
303
151
  }
304
-
305
152
  free() {
306
153
  const ptr = this.__destroy_into_raw();
307
154
  wasm.__wbg_zstdcompressor_free(ptr, 0);
308
155
  }
309
- /**
310
- * Creates a new streaming compressor
311
- * @param {number | null} [level]
312
- */
313
- constructor(level) {
314
- const ret = wasm.zstdcompressor_new(isLikeNone(level) ? 0x100000001 : (level) >> 0);
315
- if (ret[2]) {
316
- throw takeFromExternrefTable0(ret[1]);
317
- }
318
- this.__wbg_ptr = ret[0] >>> 0;
319
- ZstdCompressorFinalization.register(this, this.__wbg_ptr, this);
320
- return this;
321
- }
322
156
  /**
323
157
  * Compresses a chunk of data
324
158
  * @param {Uint8Array} data
@@ -344,43 +178,50 @@ export class ZstdCompressor {
344
178
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
345
179
  return v1;
346
180
  }
181
+ /**
182
+ * Creates a new streaming compressor
183
+ * @param {number | null} [level]
184
+ */
185
+ constructor(level) {
186
+ const ret = wasm.zstdcompressor_new(isLikeNone(level) ? 0x100000001 : (level) >> 0);
187
+ if (ret[2]) {
188
+ throw takeFromExternrefTable0(ret[1]);
189
+ }
190
+ this.__wbg_ptr = ret[0] >>> 0;
191
+ ZstdCompressorFinalization.register(this, this.__wbg_ptr, this);
192
+ return this;
193
+ }
194
+ /**
195
+ * Flush the internal buffer to get compressed data for this chunk
196
+ * @param {number} at
197
+ * @returns {Uint8Array}
198
+ */
199
+ split_off_chunk(at) {
200
+ const ret = wasm.zstdcompressor_split_off_chunk(this.__wbg_ptr, at);
201
+ if (ret[3]) {
202
+ throw takeFromExternrefTable0(ret[2]);
203
+ }
204
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
205
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
206
+ return v1;
207
+ }
347
208
  }
348
209
  if (Symbol.dispose) ZstdCompressor.prototype[Symbol.dispose] = ZstdCompressor.prototype.free;
349
210
 
350
- const ZstdDecompressorFinalization = (typeof FinalizationRegistry === 'undefined')
351
- ? { register: () => {}, unregister: () => {} }
352
- : new FinalizationRegistry(ptr => wasm.__wbg_zstddecompressor_free(ptr >>> 0, 1));
353
211
  /**
354
212
  * Streaming decompression for large data
355
213
  */
356
214
  export class ZstdDecompressor {
357
-
358
215
  __destroy_into_raw() {
359
216
  const ptr = this.__wbg_ptr;
360
217
  this.__wbg_ptr = 0;
361
218
  ZstdDecompressorFinalization.unregister(this);
362
219
  return ptr;
363
220
  }
364
-
365
221
  free() {
366
222
  const ptr = this.__destroy_into_raw();
367
223
  wasm.__wbg_zstddecompressor_free(ptr, 0);
368
224
  }
369
- /**
370
- * Creates a new streaming decompressor
371
- * @param {Uint8Array} compressed_data
372
- */
373
- constructor(compressed_data) {
374
- const ptr0 = passArray8ToWasm0(compressed_data, wasm.__wbindgen_malloc);
375
- const len0 = WASM_VECTOR_LEN;
376
- const ret = wasm.zstddecompressor_new(ptr0, len0);
377
- if (ret[2]) {
378
- throw takeFromExternrefTable0(ret[1]);
379
- }
380
- this.__wbg_ptr = ret[0] >>> 0;
381
- ZstdDecompressorFinalization.register(this, this.__wbg_ptr, this);
382
- return this;
383
- }
384
225
  /**
385
226
  * Decompresses a chunk of data
386
227
  * @param {number} max_output_size
@@ -408,35 +249,201 @@ export class ZstdDecompressor {
408
249
  wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
409
250
  return v1;
410
251
  }
252
+ /**
253
+ * Creates a new streaming decompressor
254
+ * @param {Uint8Array} compressed_data
255
+ */
256
+ constructor(compressed_data) {
257
+ const ptr0 = passArray8ToWasm0(compressed_data, wasm.__wbindgen_malloc);
258
+ const len0 = WASM_VECTOR_LEN;
259
+ const ret = wasm.zstddecompressor_new(ptr0, len0);
260
+ if (ret[2]) {
261
+ throw takeFromExternrefTable0(ret[1]);
262
+ }
263
+ this.__wbg_ptr = ret[0] >>> 0;
264
+ ZstdDecompressorFinalization.register(this, this.__wbg_ptr, this);
265
+ return this;
266
+ }
411
267
  }
412
268
  if (Symbol.dispose) ZstdDecompressor.prototype[Symbol.dispose] = ZstdDecompressor.prototype.free;
413
269
 
414
- const imports = {
415
- __wbindgen_placeholder__: {
416
- __wbg_wbindgenthrow_451ec1a8469d7eb6: function(arg0, arg1) {
270
+ /**
271
+ * Compresses data using Zstandard compression
272
+ *
273
+ * # Arguments
274
+ *
275
+ * * `data` - Input data to compress
276
+ * * `level` - Compression level (1-22, default 6). Higher = better compression but slower
277
+ * @param {Uint8Array} data
278
+ * @param {number | null} [level]
279
+ * @returns {Uint8Array}
280
+ */
281
+ export function compress(data, level) {
282
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
283
+ const len0 = WASM_VECTOR_LEN;
284
+ const ret = wasm.compress(ptr0, len0, isLikeNone(level) ? 0x100000001 : (level) >> 0);
285
+ if (ret[3]) {
286
+ throw takeFromExternrefTable0(ret[2]);
287
+ }
288
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
289
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
290
+ return v2;
291
+ }
292
+
293
+ /**
294
+ * Compresses data using Zstandard compression with a dictionary
295
+ *
296
+ * # Arguments
297
+ *
298
+ * * `data` - Input data to compress
299
+ * * `dict` - The compression dictionary
300
+ * * `level` - Compression level (1-22, default 6). Higher = better compression but slower
301
+ * @param {Uint8Array} data
302
+ * @param {Uint8Array} dict
303
+ * @param {number | null} [level]
304
+ * @returns {Uint8Array}
305
+ */
306
+ export function compress_with_dict(data, dict, level) {
307
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
308
+ const len0 = WASM_VECTOR_LEN;
309
+ const ptr1 = passArray8ToWasm0(dict, wasm.__wbindgen_malloc);
310
+ const len1 = WASM_VECTOR_LEN;
311
+ const ret = wasm.compress_with_dict(ptr0, len0, ptr1, len1, isLikeNone(level) ? 0x100000001 : (level) >> 0);
312
+ if (ret[3]) {
313
+ throw takeFromExternrefTable0(ret[2]);
314
+ }
315
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
316
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
317
+ return v3;
318
+ }
319
+
320
+ /**
321
+ * Decompresses Zstandard compressed data
322
+ *
323
+ * # Arguments
324
+ *
325
+ * * `compressed_data` - Zstandard compressed data
326
+ * @param {Uint8Array} compressed_data
327
+ * @returns {Uint8Array}
328
+ */
329
+ export function decompress(compressed_data) {
330
+ const ptr0 = passArray8ToWasm0(compressed_data, wasm.__wbindgen_malloc);
331
+ const len0 = WASM_VECTOR_LEN;
332
+ const ret = wasm.decompress(ptr0, len0);
333
+ if (ret[3]) {
334
+ throw takeFromExternrefTable0(ret[2]);
335
+ }
336
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
337
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
338
+ return v2;
339
+ }
340
+
341
+ /**
342
+ * Decompresses Zstandard compressed data using a dictionary
343
+ *
344
+ * # Arguments
345
+ *
346
+ * * `data` - Zstandard compressed data
347
+ * * `dict` - The decompression dictionary (must match the compression dictionary)
348
+ * @param {Uint8Array} data
349
+ * @param {Uint8Array} dict
350
+ * @returns {Uint8Array}
351
+ */
352
+ export function decompress_with_dict(data, dict) {
353
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
354
+ const len0 = WASM_VECTOR_LEN;
355
+ const ptr1 = passArray8ToWasm0(dict, wasm.__wbindgen_malloc);
356
+ const len1 = WASM_VECTOR_LEN;
357
+ const ret = wasm.decompress_with_dict(ptr0, len0, ptr1, len1);
358
+ if (ret[3]) {
359
+ throw takeFromExternrefTable0(ret[2]);
360
+ }
361
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
362
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
363
+ return v3;
364
+ }
365
+
366
+ function __wbg_get_imports() {
367
+ const import0 = {
368
+ __proto__: null,
369
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
417
370
  throw new Error(getStringFromWasm0(arg0, arg1));
418
371
  },
419
- __wbindgen_cast_2241b6af4c4b2941: function(arg0, arg1) {
372
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
420
373
  // Cast intrinsic for `Ref(String) -> Externref`.
421
374
  const ret = getStringFromWasm0(arg0, arg1);
422
375
  return ret;
423
376
  },
424
377
  __wbindgen_init_externref_table: function() {
425
- const table = wasm.__wbindgen_export_0;
378
+ const table = wasm.__wbindgen_externrefs;
426
379
  const offset = table.grow(4);
427
380
  table.set(0, undefined);
428
381
  table.set(offset + 0, undefined);
429
382
  table.set(offset + 1, null);
430
383
  table.set(offset + 2, true);
431
384
  table.set(offset + 3, false);
432
- ;
433
385
  },
434
- },
386
+ };
387
+ return {
388
+ __proto__: null,
389
+ "./zstd_wasm_vn_bg.js": import0,
390
+ };
391
+ }
435
392
 
436
- };
393
+ const ZstdFinalization = (typeof FinalizationRegistry === 'undefined')
394
+ ? { register: () => {}, unregister: () => {} }
395
+ : new FinalizationRegistry(ptr => wasm.__wbg_zstd_free(ptr >>> 0, 1));
396
+ const ZstdCompressorFinalization = (typeof FinalizationRegistry === 'undefined')
397
+ ? { register: () => {}, unregister: () => {} }
398
+ : new FinalizationRegistry(ptr => wasm.__wbg_zstdcompressor_free(ptr >>> 0, 1));
399
+ const ZstdDecompressorFinalization = (typeof FinalizationRegistry === 'undefined')
400
+ ? { register: () => {}, unregister: () => {} }
401
+ : new FinalizationRegistry(ptr => wasm.__wbg_zstddecompressor_free(ptr >>> 0, 1));
402
+
403
+ function getArrayU8FromWasm0(ptr, len) {
404
+ ptr = ptr >>> 0;
405
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
406
+ }
437
407
 
438
- const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
439
- wasm = wasmInstance.exports;
408
+ function getStringFromWasm0(ptr, len) {
409
+ ptr = ptr >>> 0;
410
+ return decodeText(ptr, len);
411
+ }
440
412
 
441
- wasm.__wbindgen_start();
413
+ let cachedUint8ArrayMemory0 = null;
414
+ function getUint8ArrayMemory0() {
415
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
416
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
417
+ }
418
+ return cachedUint8ArrayMemory0;
419
+ }
442
420
 
421
+ function isLikeNone(x) {
422
+ return x === undefined || x === null;
423
+ }
424
+
425
+ function passArray8ToWasm0(arg, malloc) {
426
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
427
+ getUint8ArrayMemory0().set(arg, ptr / 1);
428
+ WASM_VECTOR_LEN = arg.length;
429
+ return ptr;
430
+ }
431
+
432
+ function takeFromExternrefTable0(idx) {
433
+ const value = wasm.__wbindgen_externrefs.get(idx);
434
+ wasm.__externref_table_dealloc(idx);
435
+ return value;
436
+ }
437
+
438
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
439
+ cachedTextDecoder.decode();
440
+ function decodeText(ptr, len) {
441
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
442
+ }
443
+
444
+ let WASM_VECTOR_LEN = 0;
445
+
446
+ import source wasmModule from "./zstd_wasm_vn_bg.wasm";
447
+ const wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
448
+ let wasm = wasmInstance.exports;
449
+ wasm.__wbindgen_start();
Binary file
@@ -1,38 +1,39 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
+ export const __wbg_zstd_free: (a: number, b: number) => void;
5
+ export const __wbg_zstdcompressor_free: (a: number, b: number) => void;
6
+ export const __wbg_zstddecompressor_free: (a: number, b: number) => void;
4
7
  export const compress: (a: number, b: number, c: number) => [number, number, number, number];
5
8
  export const compress_with_dict: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
6
9
  export const decompress: (a: number, b: number) => [number, number, number, number];
7
10
  export const decompress_with_dict: (a: number, b: number, c: number, d: number) => [number, number, number, number];
8
- export const __wbg_zstd_free: (a: number, b: number) => void;
9
11
  export const zstd_compress: (a: number, b: number, c: number) => [number, number, number, number];
12
+ export const zstd_compressBound: (a: number) => number;
10
13
  export const zstd_compress_with_dict: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
14
+ export const zstd_compressionRatio: (a: number, b: number) => number;
11
15
  export const zstd_decompress: (a: number, b: number) => [number, number, number, number];
12
16
  export const zstd_decompress_with_dict: (a: number, b: number, c: number, d: number) => [number, number, number, number];
13
17
  export const zstd_defaultCompressionLevel: () => number;
14
- export const zstd_minCompressionLevel: () => number;
15
18
  export const zstd_maxCompressionLevel: () => number;
16
- export const zstd_compressBound: (a: number) => number;
17
- export const zstd_compressionRatio: (a: number, b: number) => number;
19
+ export const zstd_minCompressionLevel: () => number;
18
20
  export const zstd_spaceSavings: (a: number, b: number) => number;
19
- export const __wbg_zstdcompressor_free: (a: number, b: number) => void;
20
- export const zstdcompressor_new: (a: number) => [number, number, number];
21
21
  export const zstdcompressor_compress_chunk: (a: number, b: number, c: number) => [number, number];
22
22
  export const zstdcompressor_finalize: (a: number) => [number, number, number, number];
23
- export const __wbg_zstddecompressor_free: (a: number, b: number) => void;
24
- export const zstddecompressor_new: (a: number, b: number) => [number, number, number];
23
+ export const zstdcompressor_new: (a: number) => [number, number, number];
24
+ export const zstdcompressor_split_off_chunk: (a: number, b: number) => [number, number, number, number];
25
25
  export const zstddecompressor_decompress_chunk: (a: number, b: number) => [number, number, number, number];
26
26
  export const zstddecompressor_finalize: (a: number) => [number, number, number, number];
27
- export const rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
28
- export const rust_zstd_wasm_shim_malloc: (a: number) => number;
29
- export const rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
27
+ export const zstddecompressor_new: (a: number, b: number) => [number, number, number];
30
28
  export const rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
31
29
  export const rust_zstd_wasm_shim_free: (a: number) => void;
30
+ export const rust_zstd_wasm_shim_malloc: (a: number) => number;
31
+ export const rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
32
32
  export const rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
33
33
  export const rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
34
34
  export const rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
35
- export const __wbindgen_export_0: WebAssembly.Table;
35
+ export const rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
36
+ export const __wbindgen_externrefs: WebAssembly.Table;
36
37
  export const __wbindgen_malloc: (a: number, b: number) => number;
37
38
  export const __externref_table_dealloc: (a: number) => void;
38
39
  export const __wbindgen_free: (a: number, b: number, c: number) => void;