rapidhash-wasm-vn 1.0.0

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.
Files changed (34) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/bundler/rapidhash_wasm_vn.d.ts +161 -0
  4. package/bundler/rapidhash_wasm_vn.js +5 -0
  5. package/bundler/rapidhash_wasm_vn_bg.js +539 -0
  6. package/bundler/rapidhash_wasm_vn_bg.wasm +0 -0
  7. package/bundler/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
  8. package/deno/rapidhash_wasm_vn.d.ts +161 -0
  9. package/deno/rapidhash_wasm_vn.js +537 -0
  10. package/deno/rapidhash_wasm_vn_bg.wasm +0 -0
  11. package/deno/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
  12. package/esm/package.json +4 -0
  13. package/esm/rapidhash_wasm_vn.d.ts +161 -0
  14. package/esm/rapidhash_wasm_vn.js +17 -0
  15. package/esm/rapidhash_wasm_vn_bg.js +533 -0
  16. package/esm/rapidhash_wasm_vn_bg.wasm +0 -0
  17. package/esm/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
  18. package/module/rapidhash_wasm_vn.d.ts +161 -0
  19. package/module/rapidhash_wasm_vn.js +538 -0
  20. package/module/rapidhash_wasm_vn_bg.wasm +0 -0
  21. package/module/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
  22. package/no-modules/rapidhash_wasm_vn.d.ts +233 -0
  23. package/no-modules/rapidhash_wasm_vn.js +654 -0
  24. package/no-modules/rapidhash_wasm_vn_bg.wasm +0 -0
  25. package/no-modules/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
  26. package/nodejs/rapidhash_wasm_vn.d.ts +161 -0
  27. package/nodejs/rapidhash_wasm_vn.js +546 -0
  28. package/nodejs/rapidhash_wasm_vn_bg.wasm +0 -0
  29. package/nodejs/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
  30. package/package.json +79 -0
  31. package/web/rapidhash_wasm_vn.d.ts +241 -0
  32. package/web/rapidhash_wasm_vn.js +644 -0
  33. package/web/rapidhash_wasm_vn_bg.wasm +0 -0
  34. package/web/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
@@ -0,0 +1,654 @@
1
+ let wasm_bindgen;
2
+ (function() {
3
+ const __exports = {};
4
+ let script_src;
5
+ if (typeof document !== 'undefined' && document.currentScript !== null) {
6
+ script_src = new URL(document.currentScript.src, location.href).toString();
7
+ }
8
+ let wasm = undefined;
9
+
10
+ let cachedUint8ArrayMemory0 = null;
11
+
12
+ function getUint8ArrayMemory0() {
13
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
14
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
15
+ }
16
+ return cachedUint8ArrayMemory0;
17
+ }
18
+
19
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
20
+
21
+ cachedTextDecoder.decode();
22
+
23
+ function decodeText(ptr, len) {
24
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
+ }
26
+
27
+ function getStringFromWasm0(ptr, len) {
28
+ ptr = ptr >>> 0;
29
+ return decodeText(ptr, len);
30
+ }
31
+
32
+ let WASM_VECTOR_LEN = 0;
33
+
34
+ function passArray8ToWasm0(arg, malloc) {
35
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
36
+ getUint8ArrayMemory0().set(arg, ptr / 1);
37
+ WASM_VECTOR_LEN = arg.length;
38
+ return ptr;
39
+ }
40
+
41
+ function isLikeNone(x) {
42
+ return x === undefined || x === null;
43
+ }
44
+ /**
45
+ * Computes RapidHash V1 (64-bit) hash
46
+ *
47
+ * # Arguments
48
+ *
49
+ * * `input` - Input data to hash
50
+ * * `seed` - Seed value for hash (default: 0)
51
+ * @param {Uint8Array} input
52
+ * @param {bigint | null} [seed]
53
+ * @returns {bigint}
54
+ */
55
+ __exports.hash_v1 = function(input, seed) {
56
+ const ptr0 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
57
+ const len0 = WASM_VECTOR_LEN;
58
+ const ret = wasm.hash_v1(ptr0, len0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
59
+ return BigInt.asUintN(64, ret);
60
+ };
61
+
62
+ /**
63
+ * Computes RapidHash V2 (64-bit) hash
64
+ *
65
+ * # Arguments
66
+ *
67
+ * * `input` - Input data to hash
68
+ * * `seed` - Seed value for hash (default: 0)
69
+ * @param {Uint8Array} input
70
+ * @param {bigint | null} [seed]
71
+ * @returns {bigint}
72
+ */
73
+ __exports.hash_v2 = function(input, seed) {
74
+ const ptr0 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
75
+ const len0 = WASM_VECTOR_LEN;
76
+ const ret = wasm.hash_v2(ptr0, len0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
77
+ return BigInt.asUintN(64, ret);
78
+ };
79
+
80
+ /**
81
+ * Computes RapidHash V3 (64-bit) hash
82
+ *
83
+ * # Arguments
84
+ *
85
+ * * `input` - Input data to hash
86
+ * * `seed` - Seed value for hash (default: 0)
87
+ * @param {Uint8Array} input
88
+ * @param {bigint | null} [seed]
89
+ * @returns {bigint}
90
+ */
91
+ __exports.hash_v3 = function(input, seed) {
92
+ const ptr0 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
93
+ const len0 = WASM_VECTOR_LEN;
94
+ const ret = wasm.hash_v3(ptr0, len0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
95
+ return BigInt.asUintN(64, ret);
96
+ };
97
+
98
+ /**
99
+ * Computes RapidHash V3 (64-bit) micro hash
100
+ *
101
+ * # Arguments
102
+ *
103
+ * * `input` - Input data to hash
104
+ * * `seed` - Seed value for hash (default: 0)
105
+ * @param {Uint8Array} input
106
+ * @param {bigint | null} [seed]
107
+ * @returns {bigint}
108
+ */
109
+ __exports.hash_v3_micro = function(input, seed) {
110
+ const ptr0 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
111
+ const len0 = WASM_VECTOR_LEN;
112
+ const ret = wasm.hash_v3_micro(ptr0, len0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
113
+ return BigInt.asUintN(64, ret);
114
+ };
115
+
116
+ /**
117
+ * Computes RapidHash V3 (64-bit) nano hash
118
+ *
119
+ * # Arguments
120
+ *
121
+ * * `input` - Input data to hash
122
+ * * `seed` - Seed value for hash (default: 0)
123
+ * @param {Uint8Array} input
124
+ * @param {bigint | null} [seed]
125
+ * @returns {bigint}
126
+ */
127
+ __exports.hash_v3_nano = function(input, seed) {
128
+ const ptr0 = passArray8ToWasm0(input, wasm.__wbindgen_malloc);
129
+ const len0 = WASM_VECTOR_LEN;
130
+ const ret = wasm.hash_v3_nano(ptr0, len0, !isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
131
+ return BigInt.asUintN(64, ret);
132
+ };
133
+
134
+ const FastHasherFinalization = (typeof FinalizationRegistry === 'undefined')
135
+ ? { register: () => {}, unregister: () => {} }
136
+ : new FinalizationRegistry(ptr => wasm.__wbg_fasthasher_free(ptr >>> 0, 1));
137
+
138
+ class FastHasher {
139
+
140
+ __destroy_into_raw() {
141
+ const ptr = this.__wbg_ptr;
142
+ this.__wbg_ptr = 0;
143
+ FastHasherFinalization.unregister(this);
144
+ return ptr;
145
+ }
146
+
147
+ free() {
148
+ const ptr = this.__destroy_into_raw();
149
+ wasm.__wbg_fasthasher_free(ptr, 0);
150
+ }
151
+ /**
152
+ * @param {bigint | null} [seed]
153
+ */
154
+ constructor(seed) {
155
+ const ret = wasm.fasthasher_new(!isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
156
+ this.__wbg_ptr = ret >>> 0;
157
+ FastHasherFinalization.register(this, this.__wbg_ptr, this);
158
+ return this;
159
+ }
160
+ /**
161
+ * Updates the hash with new data
162
+ * @param {Uint8Array} data
163
+ */
164
+ update(data) {
165
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
166
+ const len0 = WASM_VECTOR_LEN;
167
+ wasm.fasthasher_update(this.__wbg_ptr, ptr0, len0);
168
+ }
169
+ /**
170
+ * @param {number} data
171
+ */
172
+ update_u8(data) {
173
+ wasm.fasthasher_update_i8(this.__wbg_ptr, data);
174
+ }
175
+ /**
176
+ * @param {number} data
177
+ */
178
+ update_u16(data) {
179
+ wasm.fasthasher_update_i16(this.__wbg_ptr, data);
180
+ }
181
+ /**
182
+ * @param {number} data
183
+ */
184
+ update_u32(data) {
185
+ wasm.fasthasher_update_i32(this.__wbg_ptr, data);
186
+ }
187
+ /**
188
+ * @param {bigint} data
189
+ */
190
+ update_u64(data) {
191
+ wasm.fasthasher_update_i64(this.__wbg_ptr, data);
192
+ }
193
+ /**
194
+ * @param {bigint} data
195
+ */
196
+ update_u128(data) {
197
+ wasm.fasthasher_update_i128(this.__wbg_ptr, data, data >> BigInt(64));
198
+ }
199
+ /**
200
+ * @param {number} data
201
+ */
202
+ update_i8(data) {
203
+ wasm.fasthasher_update_i8(this.__wbg_ptr, data);
204
+ }
205
+ /**
206
+ * @param {number} data
207
+ */
208
+ update_i16(data) {
209
+ wasm.fasthasher_update_i16(this.__wbg_ptr, data);
210
+ }
211
+ /**
212
+ * @param {number} data
213
+ */
214
+ update_i32(data) {
215
+ wasm.fasthasher_update_i32(this.__wbg_ptr, data);
216
+ }
217
+ /**
218
+ * @param {bigint} data
219
+ */
220
+ update_i64(data) {
221
+ wasm.fasthasher_update_i64(this.__wbg_ptr, data);
222
+ }
223
+ /**
224
+ * @param {bigint} data
225
+ */
226
+ update_i128(data) {
227
+ wasm.fasthasher_update_i128(this.__wbg_ptr, data, data >> BigInt(64));
228
+ }
229
+ /**
230
+ * Finalizes the hash and returns the result
231
+ * @returns {bigint}
232
+ */
233
+ digest() {
234
+ const ret = wasm.fasthasher_digest(this.__wbg_ptr);
235
+ return BigInt.asUintN(64, ret);
236
+ }
237
+ /**
238
+ * Resets the hasher
239
+ */
240
+ reset() {
241
+ wasm.fasthasher_reset(this.__wbg_ptr);
242
+ }
243
+ }
244
+ if (Symbol.dispose) FastHasher.prototype[Symbol.dispose] = FastHasher.prototype.free;
245
+
246
+ __exports.FastHasher = FastHasher;
247
+
248
+ const PortableHashV1Finalization = (typeof FinalizationRegistry === 'undefined')
249
+ ? { register: () => {}, unregister: () => {} }
250
+ : new FinalizationRegistry(ptr => wasm.__wbg_portablehashv1_free(ptr >>> 0, 1));
251
+ /**
252
+ * Streaming PortableHashV1
253
+ */
254
+ class PortableHashV1 {
255
+
256
+ __destroy_into_raw() {
257
+ const ptr = this.__wbg_ptr;
258
+ this.__wbg_ptr = 0;
259
+ PortableHashV1Finalization.unregister(this);
260
+ return ptr;
261
+ }
262
+
263
+ free() {
264
+ const ptr = this.__destroy_into_raw();
265
+ wasm.__wbg_portablehashv1_free(ptr, 0);
266
+ }
267
+ /**
268
+ * @param {bigint | null} [seed]
269
+ */
270
+ constructor(seed) {
271
+ const ret = wasm.portablehashv1_new(!isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
272
+ this.__wbg_ptr = ret >>> 0;
273
+ PortableHashV1Finalization.register(this, this.__wbg_ptr, this);
274
+ return this;
275
+ }
276
+ /**
277
+ * Updates the hash with new data
278
+ * @param {Uint8Array} data
279
+ */
280
+ update(data) {
281
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
282
+ const len0 = WASM_VECTOR_LEN;
283
+ wasm.portablehashv1_update(this.__wbg_ptr, ptr0, len0);
284
+ }
285
+ /**
286
+ * Finalizes the hash and returns the result
287
+ * @returns {bigint}
288
+ */
289
+ digest() {
290
+ const ret = wasm.portablehashv1_digest(this.__wbg_ptr);
291
+ return BigInt.asUintN(64, ret);
292
+ }
293
+ /**
294
+ * Resets the hasher with optional new seed
295
+ */
296
+ reset() {
297
+ wasm.portablehashv1_reset(this.__wbg_ptr);
298
+ }
299
+ }
300
+ if (Symbol.dispose) PortableHashV1.prototype[Symbol.dispose] = PortableHashV1.prototype.free;
301
+
302
+ __exports.PortableHashV1 = PortableHashV1;
303
+
304
+ const PortableHashV2Finalization = (typeof FinalizationRegistry === 'undefined')
305
+ ? { register: () => {}, unregister: () => {} }
306
+ : new FinalizationRegistry(ptr => wasm.__wbg_portablehashv2_free(ptr >>> 0, 1));
307
+ /**
308
+ * Streaming PortableHashV2
309
+ */
310
+ class PortableHashV2 {
311
+
312
+ __destroy_into_raw() {
313
+ const ptr = this.__wbg_ptr;
314
+ this.__wbg_ptr = 0;
315
+ PortableHashV2Finalization.unregister(this);
316
+ return ptr;
317
+ }
318
+
319
+ free() {
320
+ const ptr = this.__destroy_into_raw();
321
+ wasm.__wbg_portablehashv2_free(ptr, 0);
322
+ }
323
+ /**
324
+ * @param {bigint | null} [seed]
325
+ */
326
+ constructor(seed) {
327
+ const ret = wasm.portablehashv2_new(!isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
328
+ this.__wbg_ptr = ret >>> 0;
329
+ PortableHashV2Finalization.register(this, this.__wbg_ptr, this);
330
+ return this;
331
+ }
332
+ /**
333
+ * Updates the hash with new data
334
+ * @param {Uint8Array} data
335
+ */
336
+ update(data) {
337
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
338
+ const len0 = WASM_VECTOR_LEN;
339
+ wasm.portablehashv2_update(this.__wbg_ptr, ptr0, len0);
340
+ }
341
+ /**
342
+ * Finalizes the hash and returns the result
343
+ * @returns {bigint}
344
+ */
345
+ digest() {
346
+ const ret = wasm.portablehashv2_digest(this.__wbg_ptr);
347
+ return BigInt.asUintN(64, ret);
348
+ }
349
+ /**
350
+ * Resets the hasher with optional new seed
351
+ */
352
+ reset() {
353
+ wasm.portablehashv2_reset(this.__wbg_ptr);
354
+ }
355
+ }
356
+ if (Symbol.dispose) PortableHashV2.prototype[Symbol.dispose] = PortableHashV2.prototype.free;
357
+
358
+ __exports.PortableHashV2 = PortableHashV2;
359
+
360
+ const PortableHashV3Finalization = (typeof FinalizationRegistry === 'undefined')
361
+ ? { register: () => {}, unregister: () => {} }
362
+ : new FinalizationRegistry(ptr => wasm.__wbg_portablehashv3_free(ptr >>> 0, 1));
363
+ /**
364
+ * Streaming PortableHashV3
365
+ */
366
+ class PortableHashV3 {
367
+
368
+ __destroy_into_raw() {
369
+ const ptr = this.__wbg_ptr;
370
+ this.__wbg_ptr = 0;
371
+ PortableHashV3Finalization.unregister(this);
372
+ return ptr;
373
+ }
374
+
375
+ free() {
376
+ const ptr = this.__destroy_into_raw();
377
+ wasm.__wbg_portablehashv3_free(ptr, 0);
378
+ }
379
+ /**
380
+ * @param {bigint | null} [seed]
381
+ */
382
+ constructor(seed) {
383
+ const ret = wasm.portablehashv2_new(!isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
384
+ this.__wbg_ptr = ret >>> 0;
385
+ PortableHashV3Finalization.register(this, this.__wbg_ptr, this);
386
+ return this;
387
+ }
388
+ /**
389
+ * Updates the hash with new data
390
+ * @param {Uint8Array} data
391
+ */
392
+ update(data) {
393
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
394
+ const len0 = WASM_VECTOR_LEN;
395
+ wasm.portablehashv2_update(this.__wbg_ptr, ptr0, len0);
396
+ }
397
+ /**
398
+ * Finalizes the hash and returns the result
399
+ * @returns {bigint}
400
+ */
401
+ digest() {
402
+ const ret = wasm.portablehashv3_digest(this.__wbg_ptr);
403
+ return BigInt.asUintN(64, ret);
404
+ }
405
+ /**
406
+ * Resets the hasher with optional new seed
407
+ */
408
+ reset() {
409
+ wasm.portablehashv2_reset(this.__wbg_ptr);
410
+ }
411
+ }
412
+ if (Symbol.dispose) PortableHashV3.prototype[Symbol.dispose] = PortableHashV3.prototype.free;
413
+
414
+ __exports.PortableHashV3 = PortableHashV3;
415
+
416
+ const QualityHasherFinalization = (typeof FinalizationRegistry === 'undefined')
417
+ ? { register: () => {}, unregister: () => {} }
418
+ : new FinalizationRegistry(ptr => wasm.__wbg_qualityhasher_free(ptr >>> 0, 1));
419
+
420
+ class QualityHasher {
421
+
422
+ __destroy_into_raw() {
423
+ const ptr = this.__wbg_ptr;
424
+ this.__wbg_ptr = 0;
425
+ QualityHasherFinalization.unregister(this);
426
+ return ptr;
427
+ }
428
+
429
+ free() {
430
+ const ptr = this.__destroy_into_raw();
431
+ wasm.__wbg_qualityhasher_free(ptr, 0);
432
+ }
433
+ /**
434
+ * @param {bigint | null} [seed]
435
+ */
436
+ constructor(seed) {
437
+ const ret = wasm.fasthasher_new(!isLikeNone(seed), isLikeNone(seed) ? BigInt(0) : seed);
438
+ this.__wbg_ptr = ret >>> 0;
439
+ QualityHasherFinalization.register(this, this.__wbg_ptr, this);
440
+ return this;
441
+ }
442
+ /**
443
+ * Updates the hash with new data
444
+ * @param {Uint8Array} data
445
+ */
446
+ update(data) {
447
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
448
+ const len0 = WASM_VECTOR_LEN;
449
+ wasm.qualityhasher_update(this.__wbg_ptr, ptr0, len0);
450
+ }
451
+ /**
452
+ * @param {number} data
453
+ */
454
+ update_u8(data) {
455
+ wasm.fasthasher_update_i8(this.__wbg_ptr, data);
456
+ }
457
+ /**
458
+ * @param {number} data
459
+ */
460
+ update_u16(data) {
461
+ wasm.fasthasher_update_i16(this.__wbg_ptr, data);
462
+ }
463
+ /**
464
+ * @param {number} data
465
+ */
466
+ update_u32(data) {
467
+ wasm.fasthasher_update_i32(this.__wbg_ptr, data);
468
+ }
469
+ /**
470
+ * @param {bigint} data
471
+ */
472
+ update_u64(data) {
473
+ wasm.fasthasher_update_i64(this.__wbg_ptr, data);
474
+ }
475
+ /**
476
+ * @param {bigint} data
477
+ */
478
+ update_u128(data) {
479
+ wasm.fasthasher_update_i128(this.__wbg_ptr, data, data >> BigInt(64));
480
+ }
481
+ /**
482
+ * @param {number} data
483
+ */
484
+ update_i8(data) {
485
+ wasm.fasthasher_update_i8(this.__wbg_ptr, data);
486
+ }
487
+ /**
488
+ * @param {number} data
489
+ */
490
+ update_i16(data) {
491
+ wasm.fasthasher_update_i16(this.__wbg_ptr, data);
492
+ }
493
+ /**
494
+ * @param {number} data
495
+ */
496
+ update_i32(data) {
497
+ wasm.fasthasher_update_i32(this.__wbg_ptr, data);
498
+ }
499
+ /**
500
+ * @param {bigint} data
501
+ */
502
+ update_i64(data) {
503
+ wasm.fasthasher_update_i64(this.__wbg_ptr, data);
504
+ }
505
+ /**
506
+ * @param {bigint} data
507
+ */
508
+ update_i128(data) {
509
+ wasm.fasthasher_update_i128(this.__wbg_ptr, data, data >> BigInt(64));
510
+ }
511
+ /**
512
+ * Finalizes the hash and returns the result
513
+ * @returns {bigint}
514
+ */
515
+ digest() {
516
+ const ret = wasm.qualityhasher_digest(this.__wbg_ptr);
517
+ return BigInt.asUintN(64, ret);
518
+ }
519
+ /**
520
+ * Resets the hasher
521
+ */
522
+ reset() {
523
+ wasm.fasthasher_reset(this.__wbg_ptr);
524
+ }
525
+ }
526
+ if (Symbol.dispose) QualityHasher.prototype[Symbol.dispose] = QualityHasher.prototype.free;
527
+
528
+ __exports.QualityHasher = QualityHasher;
529
+
530
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
531
+
532
+ async function __wbg_load(module, imports) {
533
+ if (typeof Response === 'function' && module instanceof Response) {
534
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
535
+ try {
536
+ return await WebAssembly.instantiateStreaming(module, imports);
537
+
538
+ } catch (e) {
539
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
540
+
541
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
542
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
543
+
544
+ } else {
545
+ throw e;
546
+ }
547
+ }
548
+ }
549
+
550
+ const bytes = await module.arrayBuffer();
551
+ return await WebAssembly.instantiate(bytes, imports);
552
+
553
+ } else {
554
+ const instance = await WebAssembly.instantiate(module, imports);
555
+
556
+ if (instance instanceof WebAssembly.Instance) {
557
+ return { instance, module };
558
+
559
+ } else {
560
+ return instance;
561
+ }
562
+ }
563
+ }
564
+
565
+ function __wbg_get_imports() {
566
+ const imports = {};
567
+ imports.wbg = {};
568
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
569
+ throw new Error(getStringFromWasm0(arg0, arg1));
570
+ };
571
+ imports.wbg.__wbindgen_init_externref_table = function() {
572
+ const table = wasm.__wbindgen_export_0;
573
+ const offset = table.grow(4);
574
+ table.set(0, undefined);
575
+ table.set(offset + 0, undefined);
576
+ table.set(offset + 1, null);
577
+ table.set(offset + 2, true);
578
+ table.set(offset + 3, false);
579
+ ;
580
+ };
581
+
582
+ return imports;
583
+ }
584
+
585
+ function __wbg_init_memory(imports, memory) {
586
+
587
+ }
588
+
589
+ function __wbg_finalize_init(instance, module) {
590
+ wasm = instance.exports;
591
+ __wbg_init.__wbindgen_wasm_module = module;
592
+ cachedUint8ArrayMemory0 = null;
593
+
594
+
595
+ wasm.__wbindgen_start();
596
+ return wasm;
597
+ }
598
+
599
+ function initSync(module) {
600
+ if (wasm !== undefined) return wasm;
601
+
602
+
603
+ if (typeof module !== 'undefined') {
604
+ if (Object.getPrototypeOf(module) === Object.prototype) {
605
+ ({module} = module)
606
+ } else {
607
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
608
+ }
609
+ }
610
+
611
+ const imports = __wbg_get_imports();
612
+
613
+ __wbg_init_memory(imports);
614
+
615
+ if (!(module instanceof WebAssembly.Module)) {
616
+ module = new WebAssembly.Module(module);
617
+ }
618
+
619
+ const instance = new WebAssembly.Instance(module, imports);
620
+
621
+ return __wbg_finalize_init(instance, module);
622
+ }
623
+
624
+ async function __wbg_init(module_or_path) {
625
+ if (wasm !== undefined) return wasm;
626
+
627
+
628
+ if (typeof module_or_path !== 'undefined') {
629
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
630
+ ({module_or_path} = module_or_path)
631
+ } else {
632
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
633
+ }
634
+ }
635
+
636
+ if (typeof module_or_path === 'undefined' && typeof script_src !== 'undefined') {
637
+ module_or_path = script_src.replace(/\.js$/, '_bg.wasm');
638
+ }
639
+ const imports = __wbg_get_imports();
640
+
641
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
642
+ module_or_path = fetch(module_or_path);
643
+ }
644
+
645
+ __wbg_init_memory(imports);
646
+
647
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
648
+
649
+ return __wbg_finalize_init(instance, module);
650
+ }
651
+
652
+ wasm_bindgen = Object.assign(__wbg_init, { initSync }, __exports);
653
+
654
+ })();
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const hash_v1: (a: number, b: number, c: number, d: bigint) => bigint;
5
+ export const __wbg_portablehashv1_free: (a: number, b: number) => void;
6
+ export const portablehashv1_new: (a: number, b: bigint) => number;
7
+ export const portablehashv1_update: (a: number, b: number, c: number) => void;
8
+ export const portablehashv1_digest: (a: number) => bigint;
9
+ export const portablehashv1_reset: (a: number) => void;
10
+ export const hash_v2: (a: number, b: number, c: number, d: bigint) => bigint;
11
+ export const __wbg_portablehashv2_free: (a: number, b: number) => void;
12
+ export const portablehashv2_new: (a: number, b: bigint) => number;
13
+ export const portablehashv2_update: (a: number, b: number, c: number) => void;
14
+ export const portablehashv2_digest: (a: number) => bigint;
15
+ export const portablehashv2_reset: (a: number) => void;
16
+ export const hash_v3: (a: number, b: number, c: number, d: bigint) => bigint;
17
+ export const hash_v3_micro: (a: number, b: number, c: number, d: bigint) => bigint;
18
+ export const hash_v3_nano: (a: number, b: number, c: number, d: bigint) => bigint;
19
+ export const portablehashv3_digest: (a: number) => bigint;
20
+ export const __wbg_fasthasher_free: (a: number, b: number) => void;
21
+ export const fasthasher_new: (a: number, b: bigint) => number;
22
+ export const fasthasher_update: (a: number, b: number, c: number) => void;
23
+ export const fasthasher_update_i8: (a: number, b: number) => void;
24
+ export const fasthasher_update_i16: (a: number, b: number) => void;
25
+ export const fasthasher_update_i32: (a: number, b: number) => void;
26
+ export const fasthasher_update_i64: (a: number, b: bigint) => void;
27
+ export const fasthasher_update_i128: (a: number, b: bigint, c: bigint) => void;
28
+ export const fasthasher_digest: (a: number) => bigint;
29
+ export const fasthasher_reset: (a: number) => void;
30
+ export const qualityhasher_update: (a: number, b: number, c: number) => void;
31
+ export const qualityhasher_digest: (a: number) => bigint;
32
+ export const fasthasher_update_u8: (a: number, b: number) => void;
33
+ export const fasthasher_update_u16: (a: number, b: number) => void;
34
+ export const qualityhasher_update_u8: (a: number, b: number) => void;
35
+ export const qualityhasher_update_u16: (a: number, b: number) => void;
36
+ export const fasthasher_update_u128: (a: number, b: bigint, c: bigint) => void;
37
+ export const qualityhasher_update_u128: (a: number, b: bigint, c: bigint) => void;
38
+ export const fasthasher_update_u32: (a: number, b: number) => void;
39
+ export const fasthasher_update_u64: (a: number, b: bigint) => void;
40
+ export const qualityhasher_update_u32: (a: number, b: number) => void;
41
+ export const qualityhasher_update_u64: (a: number, b: bigint) => void;
42
+ export const qualityhasher_new: (a: number, b: bigint) => number;
43
+ export const __wbg_qualityhasher_free: (a: number, b: number) => void;
44
+ export const __wbg_portablehashv3_free: (a: number, b: number) => void;
45
+ export const portablehashv3_reset: (a: number) => void;
46
+ export const qualityhasher_reset: (a: number) => void;
47
+ export const qualityhasher_update_i128: (a: number, b: bigint, c: bigint) => void;
48
+ export const qualityhasher_update_i64: (a: number, b: bigint) => void;
49
+ export const qualityhasher_update_i32: (a: number, b: number) => void;
50
+ export const qualityhasher_update_i16: (a: number, b: number) => void;
51
+ export const qualityhasher_update_i8: (a: number, b: number) => void;
52
+ export const portablehashv3_update: (a: number, b: number, c: number) => void;
53
+ export const portablehashv3_new: (a: number, b: bigint) => number;
54
+ export const __wbindgen_export_0: WebAssembly.Table;
55
+ export const __wbindgen_malloc: (a: number, b: number) => number;
56
+ export const __wbindgen_start: () => void;