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