rapidhash-wasm-vn 1.1.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,5 +1,135 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+
4
+ export class FastHasher {
5
+ free(): void;
6
+ [Symbol.dispose](): void;
7
+ /**
8
+ * Finalizes the hash and returns the result
9
+ */
10
+ digest(): bigint;
11
+ constructor(seed?: bigint | null);
12
+ /**
13
+ * Resets the hasher
14
+ */
15
+ reset(): void;
16
+ /**
17
+ * Updates the hash with new data
18
+ */
19
+ update(data: Uint8Array): void;
20
+ update_i128(data: bigint): void;
21
+ update_i16(data: number): void;
22
+ update_i32(data: number): void;
23
+ update_i64(data: bigint): void;
24
+ update_i8(data: number): void;
25
+ update_u128(data: bigint): void;
26
+ update_u16(data: number): void;
27
+ update_u32(data: number): void;
28
+ update_u64(data: bigint): void;
29
+ update_u8(data: number): void;
30
+ }
31
+
32
+ /**
33
+ * Streaming PortableHashV1
34
+ */
35
+ export class PortableHashV1 {
36
+ free(): void;
37
+ [Symbol.dispose](): void;
38
+ /**
39
+ * Finalizes the hash and returns the result
40
+ */
41
+ digest(): bigint;
42
+ constructor(seed?: bigint | null);
43
+ /**
44
+ * Resets the hasher with optional new seed
45
+ */
46
+ reset(): void;
47
+ /**
48
+ * Updates the hash with new data
49
+ */
50
+ update(data: Uint8Array): void;
51
+ }
52
+
53
+ /**
54
+ * Streaming PortableHashV2
55
+ */
56
+ export class PortableHashV2 {
57
+ free(): void;
58
+ [Symbol.dispose](): void;
59
+ /**
60
+ * Finalizes the hash and returns the result
61
+ */
62
+ digest(): bigint;
63
+ constructor(seed?: bigint | null);
64
+ /**
65
+ * Resets the hasher with optional new seed
66
+ */
67
+ reset(): void;
68
+ /**
69
+ * Updates the hash with new data
70
+ */
71
+ update(data: Uint8Array): void;
72
+ }
73
+
74
+ /**
75
+ * Streaming PortableHashV3
76
+ */
77
+ export class PortableHashV3 {
78
+ free(): void;
79
+ [Symbol.dispose](): void;
80
+ /**
81
+ * Finalizes the hash and returns the result
82
+ */
83
+ digest(): bigint;
84
+ constructor(seed?: bigint | null);
85
+ /**
86
+ * Resets the hasher with optional new seed
87
+ */
88
+ reset(): void;
89
+ /**
90
+ * Updates the hash with new data
91
+ */
92
+ update(data: Uint8Array): void;
93
+ }
94
+
95
+ export class QualityHasher {
96
+ free(): void;
97
+ [Symbol.dispose](): void;
98
+ /**
99
+ * Finalizes the hash and returns the result
100
+ */
101
+ digest(): bigint;
102
+ constructor(seed?: bigint | null);
103
+ /**
104
+ * Resets the hasher
105
+ */
106
+ reset(): void;
107
+ /**
108
+ * Updates the hash with new data
109
+ */
110
+ update(data: Uint8Array): void;
111
+ update_i128(data: bigint): void;
112
+ update_i16(data: number): void;
113
+ update_i32(data: number): void;
114
+ update_i64(data: bigint): void;
115
+ update_i8(data: number): void;
116
+ update_u128(data: bigint): void;
117
+ update_u16(data: number): void;
118
+ update_u32(data: number): void;
119
+ update_u64(data: bigint): void;
120
+ update_u8(data: number): void;
121
+ }
122
+
123
+ /**
124
+ * RapidHash V3 - (64-bit) hash file
125
+ *
126
+ * # Arguments
127
+ *
128
+ * * `input` - Input data to hash
129
+ * * `seed` - Seed value for hash (default: 0)
130
+ */
131
+ export function hash_file_v3(input: Uint8Array, seed?: bigint | null): bigint;
132
+
3
133
  /**
4
134
  * Computes RapidHash V1 (64-bit) hash
5
135
  *
@@ -9,10 +139,12 @@
9
139
  * * `seed` - Seed value for hash (default: 0)
10
140
  */
11
141
  export function hash_v1(input: Uint8Array, seed?: bigint | null): bigint;
142
+
12
143
  /**
13
144
  * Computes multiple RapidHash V1 (64-bit) hashes in batch
14
145
  */
15
146
  export function hash_v1_batch(chunks: Uint8Array[], seed?: bigint | null): BigUint64Array;
147
+
16
148
  /**
17
149
  * Computes RapidHash V2 (64-bit) hash
18
150
  *
@@ -22,10 +154,12 @@ export function hash_v1_batch(chunks: Uint8Array[], seed?: bigint | null): BigUi
22
154
  * * `seed` - Seed value for hash (default: 0)
23
155
  */
24
156
  export function hash_v2(input: Uint8Array, seed?: bigint | null): bigint;
157
+
25
158
  /**
26
159
  * Computes multiple RapidHash V2 (64-bit) hashes in batch
27
160
  */
28
161
  export function hash_v2_batch(chunks: Uint8Array[], seed?: bigint | null): BigUint64Array;
162
+
29
163
  /**
30
164
  * Computes RapidHash V3 (64-bit) hash
31
165
  *
@@ -35,6 +169,12 @@ export function hash_v2_batch(chunks: Uint8Array[], seed?: bigint | null): BigUi
35
169
  * * `seed` - Seed value for hash (default: 0)
36
170
  */
37
171
  export function hash_v3(input: Uint8Array, seed?: bigint | null): bigint;
172
+
173
+ /**
174
+ * Computes multiple RapidHash V3 (64-bit) hashes in batch
175
+ */
176
+ export function hash_v3_batch(chunks: Uint8Array[], seed?: bigint | null): BigUint64Array;
177
+
38
178
  /**
39
179
  * Computes RapidHash V3 (64-bit) micro hash
40
180
  *
@@ -44,6 +184,7 @@ export function hash_v3(input: Uint8Array, seed?: bigint | null): bigint;
44
184
  * * `seed` - Seed value for hash (default: 0)
45
185
  */
46
186
  export function hash_v3_micro(input: Uint8Array, seed?: bigint | null): bigint;
187
+
47
188
  /**
48
189
  * Computes RapidHash V3 (64-bit) nano hash
49
190
  *
@@ -53,121 +194,3 @@ export function hash_v3_micro(input: Uint8Array, seed?: bigint | null): bigint;
53
194
  * * `seed` - Seed value for hash (default: 0)
54
195
  */
55
196
  export function hash_v3_nano(input: Uint8Array, seed?: bigint | null): bigint;
56
- /**
57
- * Computes multiple RapidHash V3 (64-bit) hashes in batch
58
- */
59
- export function hash_v3_batch(chunks: Uint8Array[], seed?: bigint | null): BigUint64Array;
60
- export class FastHasher {
61
- free(): void;
62
- [Symbol.dispose](): void;
63
- constructor(seed?: bigint | null);
64
- /**
65
- * Updates the hash with new data
66
- */
67
- update(data: Uint8Array): void;
68
- update_u8(data: number): void;
69
- update_u16(data: number): void;
70
- update_u32(data: number): void;
71
- update_u64(data: bigint): void;
72
- update_u128(data: bigint): void;
73
- update_i8(data: number): void;
74
- update_i16(data: number): void;
75
- update_i32(data: number): void;
76
- update_i64(data: bigint): void;
77
- update_i128(data: bigint): void;
78
- /**
79
- * Finalizes the hash and returns the result
80
- */
81
- digest(): bigint;
82
- /**
83
- * Resets the hasher
84
- */
85
- reset(): void;
86
- }
87
- /**
88
- * Streaming PortableHashV1
89
- */
90
- export class PortableHashV1 {
91
- free(): void;
92
- [Symbol.dispose](): void;
93
- constructor(seed?: bigint | null);
94
- /**
95
- * Updates the hash with new data
96
- */
97
- update(data: Uint8Array): void;
98
- /**
99
- * Finalizes the hash and returns the result
100
- */
101
- digest(): bigint;
102
- /**
103
- * Resets the hasher with optional new seed
104
- */
105
- reset(): void;
106
- }
107
- /**
108
- * Streaming PortableHashV2
109
- */
110
- export class PortableHashV2 {
111
- free(): void;
112
- [Symbol.dispose](): void;
113
- constructor(seed?: bigint | null);
114
- /**
115
- * Updates the hash with new data
116
- */
117
- update(data: Uint8Array): void;
118
- /**
119
- * Finalizes the hash and returns the result
120
- */
121
- digest(): bigint;
122
- /**
123
- * Resets the hasher with optional new seed
124
- */
125
- reset(): void;
126
- }
127
- /**
128
- * Streaming PortableHashV3
129
- */
130
- export class PortableHashV3 {
131
- free(): void;
132
- [Symbol.dispose](): void;
133
- constructor(seed?: bigint | null);
134
- /**
135
- * Updates the hash with new data
136
- */
137
- update(data: Uint8Array): void;
138
- /**
139
- * Finalizes the hash and returns the result
140
- */
141
- digest(): bigint;
142
- /**
143
- * Resets the hasher with optional new seed
144
- */
145
- reset(): void;
146
- }
147
- export class QualityHasher {
148
- free(): void;
149
- [Symbol.dispose](): void;
150
- constructor(seed?: bigint | null);
151
- /**
152
- * Updates the hash with new data
153
- */
154
- update(data: Uint8Array): void;
155
- update_u8(data: number): void;
156
- update_u16(data: number): void;
157
- update_u32(data: number): void;
158
- update_u64(data: bigint): void;
159
- update_u128(data: bigint): void;
160
- update_i8(data: number): void;
161
- update_i16(data: number): void;
162
- update_i32(data: number): void;
163
- update_i64(data: bigint): void;
164
- update_i128(data: bigint): void;
165
- /**
166
- * Finalizes the hash and returns the result
167
- */
168
- digest(): bigint;
169
- /**
170
- * Resets the hasher
171
- */
172
- reset(): void;
173
- }
@@ -1,5 +1,9 @@
1
+ /* @ts-self-types="./rapidhash_wasm_vn.d.ts" */
2
+
1
3
  import * as wasm from "./rapidhash_wasm_vn_bg.wasm";
2
- export * from "./rapidhash_wasm_vn_bg.js";
3
4
  import { __wbg_set_wasm } from "./rapidhash_wasm_vn_bg.js";
4
5
  __wbg_set_wasm(wasm);
5
6
  wasm.__wbindgen_start();
7
+ export {
8
+ FastHasher, PortableHashV1, PortableHashV2, PortableHashV3, QualityHasher, hash_file_v3, hash_v1, hash_v1_batch, hash_v2, hash_v2_batch, hash_v3, hash_v3_batch, hash_v3_micro, hash_v3_nano
9
+ } from "./rapidhash_wasm_vn_bg.js";