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.
- package/LICENSE +21 -0
- package/README.md +26 -0
- package/bundler/rapidhash_wasm_vn.d.ts +161 -0
- package/bundler/rapidhash_wasm_vn.js +5 -0
- package/bundler/rapidhash_wasm_vn_bg.js +539 -0
- package/bundler/rapidhash_wasm_vn_bg.wasm +0 -0
- package/bundler/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/deno/rapidhash_wasm_vn.d.ts +161 -0
- package/deno/rapidhash_wasm_vn.js +537 -0
- package/deno/rapidhash_wasm_vn_bg.wasm +0 -0
- package/deno/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/esm/package.json +4 -0
- package/esm/rapidhash_wasm_vn.d.ts +161 -0
- package/esm/rapidhash_wasm_vn.js +17 -0
- package/esm/rapidhash_wasm_vn_bg.js +533 -0
- package/esm/rapidhash_wasm_vn_bg.wasm +0 -0
- package/esm/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/module/rapidhash_wasm_vn.d.ts +161 -0
- package/module/rapidhash_wasm_vn.js +538 -0
- package/module/rapidhash_wasm_vn_bg.wasm +0 -0
- package/module/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/no-modules/rapidhash_wasm_vn.d.ts +233 -0
- package/no-modules/rapidhash_wasm_vn.js +654 -0
- package/no-modules/rapidhash_wasm_vn_bg.wasm +0 -0
- package/no-modules/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/nodejs/rapidhash_wasm_vn.d.ts +161 -0
- package/nodejs/rapidhash_wasm_vn.js +546 -0
- package/nodejs/rapidhash_wasm_vn_bg.wasm +0 -0
- package/nodejs/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/package.json +79 -0
- package/web/rapidhash_wasm_vn.d.ts +241 -0
- package/web/rapidhash_wasm_vn.js +644 -0
- package/web/rapidhash_wasm_vn_bg.wasm +0 -0
- package/web/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
|
@@ -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;
|
package/esm/package.json
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Computes RapidHash V1 (64-bit) hash
|
|
5
|
+
*
|
|
6
|
+
* # Arguments
|
|
7
|
+
*
|
|
8
|
+
* * `input` - Input data to hash
|
|
9
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
10
|
+
*/
|
|
11
|
+
export function hash_v1(input: Uint8Array, seed?: bigint | null): bigint;
|
|
12
|
+
/**
|
|
13
|
+
* Computes RapidHash V2 (64-bit) hash
|
|
14
|
+
*
|
|
15
|
+
* # Arguments
|
|
16
|
+
*
|
|
17
|
+
* * `input` - Input data to hash
|
|
18
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
19
|
+
*/
|
|
20
|
+
export function hash_v2(input: Uint8Array, seed?: bigint | null): bigint;
|
|
21
|
+
/**
|
|
22
|
+
* Computes RapidHash V3 (64-bit) hash
|
|
23
|
+
*
|
|
24
|
+
* # Arguments
|
|
25
|
+
*
|
|
26
|
+
* * `input` - Input data to hash
|
|
27
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
28
|
+
*/
|
|
29
|
+
export function hash_v3(input: Uint8Array, seed?: bigint | null): bigint;
|
|
30
|
+
/**
|
|
31
|
+
* Computes RapidHash V3 (64-bit) micro hash
|
|
32
|
+
*
|
|
33
|
+
* # Arguments
|
|
34
|
+
*
|
|
35
|
+
* * `input` - Input data to hash
|
|
36
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
37
|
+
*/
|
|
38
|
+
export function hash_v3_micro(input: Uint8Array, seed?: bigint | null): bigint;
|
|
39
|
+
/**
|
|
40
|
+
* Computes RapidHash V3 (64-bit) nano hash
|
|
41
|
+
*
|
|
42
|
+
* # Arguments
|
|
43
|
+
*
|
|
44
|
+
* * `input` - Input data to hash
|
|
45
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
46
|
+
*/
|
|
47
|
+
export function hash_v3_nano(input: Uint8Array, seed?: bigint | null): bigint;
|
|
48
|
+
export class FastHasher {
|
|
49
|
+
free(): void;
|
|
50
|
+
[Symbol.dispose](): void;
|
|
51
|
+
constructor(seed?: bigint | null);
|
|
52
|
+
/**
|
|
53
|
+
* Updates the hash with new data
|
|
54
|
+
*/
|
|
55
|
+
update(data: Uint8Array): void;
|
|
56
|
+
update_u8(data: number): void;
|
|
57
|
+
update_u16(data: number): void;
|
|
58
|
+
update_u32(data: number): void;
|
|
59
|
+
update_u64(data: bigint): void;
|
|
60
|
+
update_u128(data: bigint): void;
|
|
61
|
+
update_i8(data: number): void;
|
|
62
|
+
update_i16(data: number): void;
|
|
63
|
+
update_i32(data: number): void;
|
|
64
|
+
update_i64(data: bigint): void;
|
|
65
|
+
update_i128(data: bigint): void;
|
|
66
|
+
/**
|
|
67
|
+
* Finalizes the hash and returns the result
|
|
68
|
+
*/
|
|
69
|
+
digest(): bigint;
|
|
70
|
+
/**
|
|
71
|
+
* Resets the hasher
|
|
72
|
+
*/
|
|
73
|
+
reset(): void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Streaming PortableHashV1
|
|
77
|
+
*/
|
|
78
|
+
export class PortableHashV1 {
|
|
79
|
+
free(): void;
|
|
80
|
+
[Symbol.dispose](): void;
|
|
81
|
+
constructor(seed?: bigint | null);
|
|
82
|
+
/**
|
|
83
|
+
* Updates the hash with new data
|
|
84
|
+
*/
|
|
85
|
+
update(data: Uint8Array): void;
|
|
86
|
+
/**
|
|
87
|
+
* Finalizes the hash and returns the result
|
|
88
|
+
*/
|
|
89
|
+
digest(): bigint;
|
|
90
|
+
/**
|
|
91
|
+
* Resets the hasher with optional new seed
|
|
92
|
+
*/
|
|
93
|
+
reset(): void;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Streaming PortableHashV2
|
|
97
|
+
*/
|
|
98
|
+
export class PortableHashV2 {
|
|
99
|
+
free(): void;
|
|
100
|
+
[Symbol.dispose](): void;
|
|
101
|
+
constructor(seed?: bigint | null);
|
|
102
|
+
/**
|
|
103
|
+
* Updates the hash with new data
|
|
104
|
+
*/
|
|
105
|
+
update(data: Uint8Array): void;
|
|
106
|
+
/**
|
|
107
|
+
* Finalizes the hash and returns the result
|
|
108
|
+
*/
|
|
109
|
+
digest(): bigint;
|
|
110
|
+
/**
|
|
111
|
+
* Resets the hasher with optional new seed
|
|
112
|
+
*/
|
|
113
|
+
reset(): void;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Streaming PortableHashV3
|
|
117
|
+
*/
|
|
118
|
+
export class PortableHashV3 {
|
|
119
|
+
free(): void;
|
|
120
|
+
[Symbol.dispose](): void;
|
|
121
|
+
constructor(seed?: bigint | null);
|
|
122
|
+
/**
|
|
123
|
+
* Updates the hash with new data
|
|
124
|
+
*/
|
|
125
|
+
update(data: Uint8Array): void;
|
|
126
|
+
/**
|
|
127
|
+
* Finalizes the hash and returns the result
|
|
128
|
+
*/
|
|
129
|
+
digest(): bigint;
|
|
130
|
+
/**
|
|
131
|
+
* Resets the hasher with optional new seed
|
|
132
|
+
*/
|
|
133
|
+
reset(): void;
|
|
134
|
+
}
|
|
135
|
+
export class QualityHasher {
|
|
136
|
+
free(): void;
|
|
137
|
+
[Symbol.dispose](): void;
|
|
138
|
+
constructor(seed?: bigint | null);
|
|
139
|
+
/**
|
|
140
|
+
* Updates the hash with new data
|
|
141
|
+
*/
|
|
142
|
+
update(data: Uint8Array): void;
|
|
143
|
+
update_u8(data: number): void;
|
|
144
|
+
update_u16(data: number): void;
|
|
145
|
+
update_u32(data: number): void;
|
|
146
|
+
update_u64(data: bigint): void;
|
|
147
|
+
update_u128(data: bigint): void;
|
|
148
|
+
update_i8(data: number): void;
|
|
149
|
+
update_i16(data: number): void;
|
|
150
|
+
update_i32(data: number): void;
|
|
151
|
+
update_i64(data: bigint): void;
|
|
152
|
+
update_i128(data: bigint): void;
|
|
153
|
+
/**
|
|
154
|
+
* Finalizes the hash and returns the result
|
|
155
|
+
*/
|
|
156
|
+
digest(): bigint;
|
|
157
|
+
/**
|
|
158
|
+
* Resets the hasher
|
|
159
|
+
*/
|
|
160
|
+
reset(): void;
|
|
161
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
let imports = {};
|
|
3
|
+
import * as import0 from './rapidhash_wasm_vn_bg.js';
|
|
4
|
+
imports['./rapidhash_wasm_vn_bg.js'] = import0;
|
|
5
|
+
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
|
|
8
|
+
const wasmUrl = new URL('rapidhash_wasm_vn_bg.wasm', import.meta.url);
|
|
9
|
+
const wasmBytes = readFileSync(wasmUrl);
|
|
10
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
11
|
+
const wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
12
|
+
export { wasm as __wasm };
|
|
13
|
+
|
|
14
|
+
imports["./rapidhash_wasm_vn_bg.js"].__wbg_set_wasm(wasm, wasmModule);
|
|
15
|
+
wasm.__wbindgen_start();
|
|
16
|
+
|
|
17
|
+
export * from "./rapidhash_wasm_vn_bg.js";
|