rapidhash-js 2.2.0 → 3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.0.0] - 2025-11-24
4
+
5
+ - Implement [rapidhash v3.0](https://github.com/Nicoshev/rapidhash).
6
+ - Add `rapidhashMicro` and `rapidhashNano` variants (v3.0 only).
7
+ - Add version-specific entry points: `rapidhash-js/v1.0`, `rapidhash-js/v2.0`, `rapidhash-js/v2.2`, and `rapidhash-js/v3.0`.
8
+ - **Breaking:** The functions `rapidhash()`, `rapidhash_fast()`, and `rapidhash_protected()` are now implemented with the v3.0 algorithm. To use v2.2, import from `rapidhash-js/v2.2`.
9
+
3
10
  ## [2.2.0] - 2025-05-29
4
11
 
5
12
  - Implement [rapidhash v2.2](https://github.com/Nicoshev/rapidhash/pull/23).
package/README.md CHANGED
@@ -19,94 +19,141 @@ npm install rapidhash-js
19
19
 
20
20
  ```typescript
21
21
  import {
22
- // The functions rapidhash, rapidhash_fast, and rapidhash_protected currently implement the v2.2 algorithm.
22
+ // These functions currently use the v3.0 implementation.
23
23
  rapidhash,
24
24
  rapidhash_fast,
25
25
  rapidhash_protected,
26
- // To use the old v1 algorithm, import rapidhash_v1 (or rapidhash_v1_fast, rapidhash_v1_protected) instead.
27
- rapidhash_v1,
26
+ // rapidhashMicro and rapidhashNano are additional variants in v3.0
27
+ rapidhashMicro,
28
+ rapidhashNano,
28
29
  } from 'rapidhash-js';
29
30
 
30
31
  // rapidhash() returns a 64-bit hash value represented as bigint.
31
- console.log(rapidhash('hello world')); // Output: 1722744455612372674n
32
+ console.log(rapidhash('hello world'));
32
33
 
33
34
  // You can specify a 64-bit seed value with the 'seed' option.
34
- console.log(rapidhash('hello world', {seed: 0x0123_4567_89AB_CDEFn})); // Output: 13409940373860458135n
35
+ console.log(rapidhash('hello world', {seed: 0x0123_4567_89AB_CDEFn}));
35
36
 
36
- // You can specify the behavior of the rapid_mum() function
37
- // with the rapidMumBehaviour option (default is 'fast').
38
- console.log(rapidhash('hello world', {rapidMumBehaviour: 'protected'})); // Output: 12365338091610779222n
37
+ // You can control rapid_mum() behavior with the rapidMumBehaviour option (default: 'fast').
38
+ console.log(rapidhash('hello world', {rapidMumBehaviour: 'protected'}));
39
39
 
40
40
  // Instead of specifying the rapidMumBehaviour option,
41
41
  // you can call rapidhash_fast() or rapidhash_protected().
42
42
  console.log(rapidhash_protected('hello world'));
43
+
44
+ // rapidhashMicro and rapidhashNano are optimized variants with smaller loop blocks
45
+ console.log(rapidhashMicro('hello world'));
46
+ console.log(rapidhashNano('hello world'));
47
+ ```
48
+
49
+ ### Using older versions
50
+
51
+ To use older versions of the algorithm, import from version-specific entry points:
52
+
53
+ ```typescript
54
+ // v2.2
55
+ import { rapidhash, rapidhash_fast, rapidhash_protected } from 'rapidhash-js/v2.2';
56
+
57
+ // v2.0
58
+ import { rapidhash, rapidhash_fast, rapidhash_protected } from 'rapidhash-js/v2.0';
59
+
60
+ // v1.0
61
+ import { rapidhash, rapidhash_fast, rapidhash_protected } from 'rapidhash-js/v1.0';
43
62
  ```
44
63
 
45
64
  ## Benchmark
46
65
 
47
66
  <details>
48
- <summary>Apple M3 Max</summary>
67
+ <summary>GitHub Actions runner</summary>
49
68
 
50
69
  ```
51
70
  [Benchmark Environment]
52
- Node.js: v22.15.1
53
- CPU: Apple M3 Max (16 cores, 2400 MHz)
71
+ Node.js: v22.21.1
72
+ CPU: AMD EPYC 7763 64-Core Processor (4 cores, 0 MHz)
54
73
 
55
74
  [1-4 bytes]
56
- [v1.0] rapidhash (fast) : 6,285,122.13 ops/s (159.11 ns/iter)
57
- [v1.0] rapidhash (protected) : 5,358,496.06 ops/s (186.62 ns/iter)
58
- [v2.0] rapidhash (fast) : 6,751,586.61 ops/s (148.11 ns/iter)
59
- [v2.0] rapidhash (protected) : 5,503,585.53 ops/s (181.70 ns/iter)
60
- [v2.2] rapidhash (fast) : 6,713,669.81 ops/s (148.95 ns/iter)
61
- [v2.2] rapidhash (protected) : 5,474,441.63 ops/s (182.67 ns/iter)
75
+ [v1.0] rapidhash (fast) : 2,420,375.33 ops/s (413.16 ns/iter)
76
+ [v1.0] rapidhash (protected) : 2,030,644.31 ops/s (492.45 ns/iter)
77
+ [v2.2] rapidhash (fast) : 2,734,729.69 ops/s (365.67 ns/iter)
78
+ [v2.2] rapidhash (protected) : 2,197,545.98 ops/s (455.05 ns/iter)
79
+ [v3.0] rapidhash (fast) : 2,674,325.05 ops/s (373.93 ns/iter)
80
+ [v3.0] rapidhash (protected) : 2,226,115.44 ops/s (449.21 ns/iter)
81
+ [v3.0] rapidhashMicro (fast) : 2,710,931.05 ops/s (368.88 ns/iter)
82
+ [v3.0] rapidhashMicro (protected) : 2,213,185.82 ops/s (451.84 ns/iter)
83
+ [v3.0] rapidhashNano (fast) : 2,655,616.94 ops/s (376.56 ns/iter)
84
+ [v3.0] rapidhashNano (protected) : 2,231,395.19 ops/s (448.15 ns/iter)
62
85
 
63
86
  [5-8 bytes]
64
- [v1.0] rapidhash (fast) : 5,995,195.47 ops/s (166.80 ns/iter)
65
- [v1.0] rapidhash (protected) : 5,129,620.76 ops/s (194.95 ns/iter)
66
- [v2.0] rapidhash (fast) : 6,217,065.60 ops/s (160.85 ns/iter)
67
- [v2.0] rapidhash (protected) : 5,326,035.89 ops/s (187.76 ns/iter)
68
- [v2.2] rapidhash (fast) : 6,050,308.59 ops/s (165.28 ns/iter)
69
- [v2.2] rapidhash (protected) : 5,344,429.93 ops/s (187.11 ns/iter)
87
+ [v1.0] rapidhash (fast) : 2,371,330.83 ops/s (421.70 ns/iter)
88
+ [v1.0] rapidhash (protected) : 2,015,037.92 ops/s (496.27 ns/iter)
89
+ [v2.2] rapidhash (fast) : 2,525,306.66 ops/s (395.99 ns/iter)
90
+ [v2.2] rapidhash (protected) : 2,151,700.91 ops/s (464.75 ns/iter)
91
+ [v3.0] rapidhash (fast) : 2,398,649.67 ops/s (416.90 ns/iter)
92
+ [v3.0] rapidhash (protected) : 2,115,376.44 ops/s (472.73 ns/iter)
93
+ [v3.0] rapidhashMicro (fast) : 2,419,115.71 ops/s (413.37 ns/iter)
94
+ [v3.0] rapidhashMicro (protected) : 2,112,217.87 ops/s (473.44 ns/iter)
95
+ [v3.0] rapidhashNano (fast) : 2,464,902.12 ops/s (405.70 ns/iter)
96
+ [v3.0] rapidhashNano (protected) : 2,139,688.49 ops/s (467.36 ns/iter)
70
97
 
71
98
  [9-16 bytes]
72
- [v1.0] rapidhash (fast) : 5,986,726.82 ops/s (167.04 ns/iter)
73
- [v1.0] rapidhash (protected) : 5,154,979.68 ops/s (193.99 ns/iter)
74
- [v2.0] rapidhash (fast) : 6,131,914.48 ops/s (163.08 ns/iter)
75
- [v2.0] rapidhash (protected) : 5,321,633.57 ops/s (187.91 ns/iter)
76
- [v2.2] rapidhash (fast) : 6,247,440.63 ops/s (160.07 ns/iter)
77
- [v2.2] rapidhash (protected) : 5,351,510.81 ops/s (186.86 ns/iter)
99
+ [v1.0] rapidhash (fast) : 2,373,128.45 ops/s (421.38 ns/iter)
100
+ [v1.0] rapidhash (protected) : 2,019,580.56 ops/s (495.15 ns/iter)
101
+ [v2.2] rapidhash (fast) : 2,494,555.85 ops/s (400.87 ns/iter)
102
+ [v2.2] rapidhash (protected) : 2,164,351.62 ops/s (462.03 ns/iter)
103
+ [v3.0] rapidhash (fast) : 2,445,111.08 ops/s (408.98 ns/iter)
104
+ [v3.0] rapidhash (protected) : 2,124,576.46 ops/s (470.68 ns/iter)
105
+ [v3.0] rapidhashMicro (fast) : 2,534,830.67 ops/s (394.50 ns/iter)
106
+ [v3.0] rapidhashMicro (protected) : 2,144,787.46 ops/s (466.25 ns/iter)
107
+ [v3.0] rapidhashNano (fast) : 2,507,392.59 ops/s (398.82 ns/iter)
108
+ [v3.0] rapidhashNano (protected) : 2,159,198.42 ops/s (463.13 ns/iter)
78
109
 
79
110
  [17-64 bytes]
80
- [v1.0] rapidhash (fast) : 3,843,646.47 ops/s (260.17 ns/iter)
81
- [v1.0] rapidhash (protected) : 3,312,988.79 ops/s (301.84 ns/iter)
82
- [v2.0] rapidhash (fast) : 3,947,650.45 ops/s (253.32 ns/iter)
83
- [v2.0] rapidhash (protected) : 3,390,062.69 ops/s (294.98 ns/iter)
84
- [v2.2] rapidhash (fast) : 4,039,784.70 ops/s (247.54 ns/iter)
85
- [v2.2] rapidhash (protected) : 3,400,339.38 ops/s (294.09 ns/iter)
111
+ [v1.0] rapidhash (fast) : 1,519,363.59 ops/s (658.17 ns/iter)
112
+ [v1.0] rapidhash (protected) : 1,308,565.57 ops/s (764.20 ns/iter)
113
+ [v2.2] rapidhash (fast) : 1,627,131.71 ops/s (614.58 ns/iter)
114
+ [v2.2] rapidhash (protected) : 1,358,146.83 ops/s (736.30 ns/iter)
115
+ [v3.0] rapidhash (fast) : 1,557,365.74 ops/s (642.11 ns/iter)
116
+ [v3.0] rapidhash (protected) : 1,278,365.66 ops/s (782.25 ns/iter)
117
+ [v3.0] rapidhashMicro (fast) : 1,566,121.67 ops/s (638.52 ns/iter)
118
+ [v3.0] rapidhashMicro (protected) : 1,309,712.62 ops/s (763.53 ns/iter)
119
+ [v3.0] rapidhashNano (fast) : 1,522,941.99 ops/s (656.62 ns/iter)
120
+ [v3.0] rapidhashNano (protected) : 1,287,697.13 ops/s (776.58 ns/iter)
86
121
 
87
122
  [65-111 bytes]
88
- [v1.0] rapidhash (fast) : 2,539,382.14 ops/s (393.80 ns/iter)
89
- [v1.0] rapidhash (protected) : 2,156,257.28 ops/s (463.77 ns/iter)
90
- [v2.0] rapidhash (fast) : 2,580,829.71 ops/s (387.47 ns/iter)
91
- [v2.0] rapidhash (protected) : 2,186,335.35 ops/s (457.39 ns/iter)
92
- [v2.2] rapidhash (fast) : 2,545,090.54 ops/s (392.91 ns/iter)
93
- [v2.2] rapidhash (protected) : 2,189,080.78 ops/s (456.81 ns/iter)
123
+ [v1.0] rapidhash (fast) : 1,012,019.84 ops/s (988.12 ns/iter)
124
+ [v1.0] rapidhash (protected) : 851,571.85 ops/s (1174.30 ns/iter)
125
+ [v2.2] rapidhash (fast) : 1,032,261.69 ops/s (968.75 ns/iter)
126
+ [v2.2] rapidhash (protected) : 873,368.59 ops/s (1144.99 ns/iter)
127
+ [v3.0] rapidhash (fast) : 1,049,513.86 ops/s (952.82 ns/iter)
128
+ [v3.0] rapidhash (protected) : 875,091.75 ops/s (1142.74 ns/iter)
129
+ [v3.0] rapidhashMicro (fast) : 1,008,137.11 ops/s (991.93 ns/iter)
130
+ [v3.0] rapidhashMicro (protected) : 843,635.34 ops/s (1185.35 ns/iter)
131
+ [v3.0] rapidhashNano (fast) : 1,019,000.92 ops/s (981.35 ns/iter)
132
+ [v3.0] rapidhashNano (protected) : 846,423.68 ops/s (1181.44 ns/iter)
94
133
 
95
134
  [112-256 bytes]
96
- [v1.0] rapidhash (fast) : 1,518,423.71 ops/s (658.58 ns/iter)
97
- [v1.0] rapidhash (protected) : 1,274,445.41 ops/s (784.66 ns/iter)
98
- [v2.0] rapidhash (fast) : 1,484,277.31 ops/s (673.73 ns/iter)
99
- [v2.0] rapidhash (protected) : 1,258,892.94 ops/s (794.35 ns/iter)
100
- [v2.2] rapidhash (fast) : 1,525,211.09 ops/s (655.65 ns/iter)
101
- [v2.2] rapidhash (protected) : 1,293,585.65 ops/s (773.05 ns/iter)
135
+ [v1.0] rapidhash (fast) : 614,172.98 ops/s (1.63 µs/iter)
136
+ [v1.0] rapidhash (protected) : 513,971.04 ops/s (1.95 µs/iter)
137
+ [v2.2] rapidhash (fast) : 610,816.92 ops/s (1.64 µs/iter)
138
+ [v2.2] rapidhash (protected) : 517,844.27 ops/s (1.93 µs/iter)
139
+ [v3.0] rapidhash (fast) : 594,643.45 ops/s (1.68 µs/iter)
140
+ [v3.0] rapidhash (protected) : 499,762.62 ops/s (2.00 µs/iter)
141
+ [v3.0] rapidhashMicro (fast) : 617,073.02 ops/s (1.62 µs/iter)
142
+ [v3.0] rapidhashMicro (protected) : 505,441.57 ops/s (1.98 µs/iter)
143
+ [v3.0] rapidhashNano (fast) : 625,289.65 ops/s (1.60 µs/iter)
144
+ [v3.0] rapidhashNano (protected) : 511,777.23 ops/s (1.95 µs/iter)
102
145
 
103
146
  [1M bytes]
104
- [v1.0] rapidhash (fast) : 356.49 ops/s (2.81 ms/iter)
105
- [v1.0] rapidhash (protected) : 296.16 ops/s (3.38 ms/iter)
106
- [v2.0] rapidhash (fast) : 375.05 ops/s (2.67 ms/iter)
107
- [v2.0] rapidhash (protected) : 309.03 ops/s (3.24 ms/iter)
108
- [v2.2] rapidhash (fast) : 374.26 ops/s (2.67 ms/iter)
109
- [v2.2] rapidhash (protected) : 309.25 ops/s (3.23 ms/iter)
147
+ [v1.0] rapidhash (fast) : 147.45 ops/s (6.78 ms/iter)
148
+ [v1.0] rapidhash (protected) : 121.19 ops/s (8.25 ms/iter)
149
+ [v2.2] rapidhash (fast) : 152.66 ops/s (6.55 ms/iter)
150
+ [v2.2] rapidhash (protected) : 125.51 ops/s (7.97 ms/iter)
151
+ [v3.0] rapidhash (fast) : 153.71 ops/s (6.51 ms/iter)
152
+ [v3.0] rapidhash (protected) : 121.11 ops/s (8.26 ms/iter)
153
+ [v3.0] rapidhashMicro (fast) : 153.73 ops/s (6.50 ms/iter)
154
+ [v3.0] rapidhashMicro (protected) : 121.58 ops/s (8.23 ms/iter)
155
+ [v3.0] rapidhashNano (fast) : 152.79 ops/s (6.54 ms/iter)
156
+ [v3.0] rapidhashNano (protected) : 120.72 ops/s (8.28 ms/iter)
110
157
  ```
111
158
 
112
159
  </details>
@@ -0,0 +1,7 @@
1
+ type RapidMumBehaviour = 'fast' | 'protected';
2
+ interface RapidhashOptions {
3
+ seed: bigint;
4
+ rapidMumBehaviour: RapidMumBehaviour;
5
+ }
6
+
7
+ export type { RapidhashOptions as R };
@@ -0,0 +1,7 @@
1
+ type RapidMumBehaviour = 'fast' | 'protected';
2
+ interface RapidhashOptions {
3
+ seed: bigint;
4
+ rapidMumBehaviour: RapidMumBehaviour;
5
+ }
6
+
7
+ export type { RapidhashOptions as R };
package/lib/index.d.mts CHANGED
@@ -1,8 +1,4 @@
1
- type RapidMumBehaviour = 'fast' | 'protected';
2
- interface RapidhashOptions {
3
- seed: bigint;
4
- rapidMumBehaviour: RapidMumBehaviour;
5
- }
1
+ import { R as RapidhashOptions } from './common-FK5Aq1u9.mjs';
6
2
 
7
3
  /**
8
4
  * Calculate a 64-bit hash value of the given message.
@@ -10,9 +6,9 @@ interface RapidhashOptions {
10
6
  * @param message {string|Uint8Array|DataView} The message to be hashed.
11
7
  * @param options Options for modifying the hash calculation.
12
8
  * @param options.seed {bigint} 64-bit unsigned seed value.
13
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
9
+ * @param options.rapidMumBehaviour {"fast"|"protected"} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
14
10
  */
15
- declare function rapidhash_v1(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
11
+ declare function rapidhash(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
16
12
  /**
17
13
  * Calculate a 64-bit hash value of the given message.
18
14
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
@@ -21,7 +17,7 @@ declare function rapidhash_v1(message: string | Uint8Array | DataView, options?:
21
17
  * @param options Options for modifying the hash calculation.
22
18
  * @param options.seed {bigint} 64-bit unsigned seed value.
23
19
  */
24
- declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
20
+ declare function rapidhash_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
25
21
  /**
26
22
  * Calculate a 64-bit hash value of the given message.
27
23
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
@@ -30,62 +26,6 @@ declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, opti
30
26
  * @param options Options for modifying the hash calculation.
31
27
  * @param options.seed {bigint} 64-bit unsigned seed value.
32
28
  */
33
- declare function rapidhash_v1_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
29
+ declare function rapidhash_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
34
30
 
35
- /**
36
- * Calculate a 64-bit hash value of the given message.
37
- *
38
- * @param message {string|Uint8Array|DataView} The message to be hashed.
39
- * @param options Options for modifying the hash calculation.
40
- * @param options.seed {bigint} 64-bit unsigned seed value.
41
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
42
- */
43
- declare function rapidhash_v2_0(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
44
- /**
45
- * Calculate a 64-bit hash value of the given message.
46
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
47
- *
48
- * @param message {string|Uint8Array|DataView} The message to be hashed.
49
- * @param options Options for modifying the hash calculation.
50
- * @param options.seed {bigint} 64-bit unsigned seed value.
51
- */
52
- declare function rapidhash_v2_0_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
53
- /**
54
- * Calculate a 64-bit hash value of the given message.
55
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
56
- *
57
- * @param message {string|Uint8Array|DataView} The message to be hashed.
58
- * @param options Options for modifying the hash calculation.
59
- * @param options.seed {bigint} 64-bit unsigned seed value.
60
- */
61
- declare function rapidhash_v2_0_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
62
-
63
- /**
64
- * Calculate a 64-bit hash value of the given message.
65
- *
66
- * @param message {string|Uint8Array|DataView} The message to be hashed.
67
- * @param options Options for modifying the hash calculation.
68
- * @param options.seed {bigint} 64-bit unsigned seed value.
69
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
70
- */
71
- declare function rapidhash_v2_2(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
72
- /**
73
- * Calculate a 64-bit hash value of the given message.
74
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
75
- *
76
- * @param message {string|Uint8Array|DataView} The message to be hashed.
77
- * @param options Options for modifying the hash calculation.
78
- * @param options.seed {bigint} 64-bit unsigned seed value.
79
- */
80
- declare function rapidhash_v2_2_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
81
- /**
82
- * Calculate a 64-bit hash value of the given message.
83
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
84
- *
85
- * @param message {string|Uint8Array|DataView} The message to be hashed.
86
- * @param options Options for modifying the hash calculation.
87
- * @param options.seed {bigint} 64-bit unsigned seed value.
88
- */
89
- declare function rapidhash_v2_2_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
90
-
91
- export { rapidhash_v2_2 as rapidhash, rapidhash_v2_2_fast as rapidhash_fast, rapidhash_v2_2_protected as rapidhash_protected, rapidhash_v1, rapidhash_v1_fast, rapidhash_v1_protected, rapidhash_v2_0, rapidhash_v2_0_fast, rapidhash_v2_0_protected, rapidhash_v2_2, rapidhash_v2_2_fast, rapidhash_v2_2_protected };
31
+ export { rapidhash, rapidhash_fast, rapidhash_protected };
package/lib/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- type RapidMumBehaviour = 'fast' | 'protected';
2
- interface RapidhashOptions {
3
- seed: bigint;
4
- rapidMumBehaviour: RapidMumBehaviour;
5
- }
1
+ import { R as RapidhashOptions } from './common-FK5Aq1u9.js';
6
2
 
7
3
  /**
8
4
  * Calculate a 64-bit hash value of the given message.
@@ -10,9 +6,9 @@ interface RapidhashOptions {
10
6
  * @param message {string|Uint8Array|DataView} The message to be hashed.
11
7
  * @param options Options for modifying the hash calculation.
12
8
  * @param options.seed {bigint} 64-bit unsigned seed value.
13
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
9
+ * @param options.rapidMumBehaviour {"fast"|"protected"} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
14
10
  */
15
- declare function rapidhash_v1(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
11
+ declare function rapidhash(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
16
12
  /**
17
13
  * Calculate a 64-bit hash value of the given message.
18
14
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
@@ -21,7 +17,7 @@ declare function rapidhash_v1(message: string | Uint8Array | DataView, options?:
21
17
  * @param options Options for modifying the hash calculation.
22
18
  * @param options.seed {bigint} 64-bit unsigned seed value.
23
19
  */
24
- declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
20
+ declare function rapidhash_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
25
21
  /**
26
22
  * Calculate a 64-bit hash value of the given message.
27
23
  * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
@@ -30,62 +26,6 @@ declare function rapidhash_v1_fast(message: string | Uint8Array | DataView, opti
30
26
  * @param options Options for modifying the hash calculation.
31
27
  * @param options.seed {bigint} 64-bit unsigned seed value.
32
28
  */
33
- declare function rapidhash_v1_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
29
+ declare function rapidhash_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
34
30
 
35
- /**
36
- * Calculate a 64-bit hash value of the given message.
37
- *
38
- * @param message {string|Uint8Array|DataView} The message to be hashed.
39
- * @param options Options for modifying the hash calculation.
40
- * @param options.seed {bigint} 64-bit unsigned seed value.
41
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
42
- */
43
- declare function rapidhash_v2_0(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
44
- /**
45
- * Calculate a 64-bit hash value of the given message.
46
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
47
- *
48
- * @param message {string|Uint8Array|DataView} The message to be hashed.
49
- * @param options Options for modifying the hash calculation.
50
- * @param options.seed {bigint} 64-bit unsigned seed value.
51
- */
52
- declare function rapidhash_v2_0_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
53
- /**
54
- * Calculate a 64-bit hash value of the given message.
55
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
56
- *
57
- * @param message {string|Uint8Array|DataView} The message to be hashed.
58
- * @param options Options for modifying the hash calculation.
59
- * @param options.seed {bigint} 64-bit unsigned seed value.
60
- */
61
- declare function rapidhash_v2_0_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
62
-
63
- /**
64
- * Calculate a 64-bit hash value of the given message.
65
- *
66
- * @param message {string|Uint8Array|DataView} The message to be hashed.
67
- * @param options Options for modifying the hash calculation.
68
- * @param options.seed {bigint} 64-bit unsigned seed value.
69
- * @param options.rapidMumBehaviour {'fast'|'protected'} Alters behaviour of the rapid_mum function. Defaults to 'fast'.
70
- */
71
- declare function rapidhash_v2_2(message: string | Uint8Array | DataView, options?: Partial<RapidhashOptions>): bigint;
72
- /**
73
- * Calculate a 64-bit hash value of the given message.
74
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'fast'.
75
- *
76
- * @param message {string|Uint8Array|DataView} The message to be hashed.
77
- * @param options Options for modifying the hash calculation.
78
- * @param options.seed {bigint} 64-bit unsigned seed value.
79
- */
80
- declare function rapidhash_v2_2_fast(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
81
- /**
82
- * Calculate a 64-bit hash value of the given message.
83
- * This function is equivalent to rapidhash() with options.rapidMumBehaviour set to 'protected'.
84
- *
85
- * @param message {string|Uint8Array|DataView} The message to be hashed.
86
- * @param options Options for modifying the hash calculation.
87
- * @param options.seed {bigint} 64-bit unsigned seed value.
88
- */
89
- declare function rapidhash_v2_2_protected(message: string | Uint8Array | DataView, options?: Partial<Omit<RapidhashOptions, 'rapidMumBehaviour'>>): bigint;
90
-
91
- export { rapidhash_v2_2 as rapidhash, rapidhash_v2_2_fast as rapidhash_fast, rapidhash_v2_2_protected as rapidhash_protected, rapidhash_v1, rapidhash_v1_fast, rapidhash_v1_protected, rapidhash_v2_0, rapidhash_v2_0_fast, rapidhash_v2_0_protected, rapidhash_v2_2, rapidhash_v2_2_fast, rapidhash_v2_2_protected };
31
+ export { rapidhash, rapidhash_fast, rapidhash_protected };