distillate 0.8.0 → 0.8.2
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/README.md +4 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -86,12 +86,14 @@ import { BinaryFuse8, BinaryFuse16 } from "distillate/fuse";
|
|
|
86
86
|
const filter = BinaryFuse8.from(["alice", "bob", "carol"]);
|
|
87
87
|
filter.has("alice"); // true
|
|
88
88
|
filter.size; // 3
|
|
89
|
-
filter.bitsPerKey; //
|
|
89
|
+
filter.bitsPerKey; // 64 at this size; see below
|
|
90
90
|
|
|
91
91
|
// Lower false-positive rate, twice the space:
|
|
92
92
|
const precise = BinaryFuse16.from(["alice", "bob", "carol"]);
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
+
`bitsPerKey` is the space actually allocated, not the asymptotic figure. Three keys pay 64 bits each because the fingerprint array has a fixed minimum; the ~9 you see quoted is what a filter approaches once `n` is large (about 9.5 at 100k). Size honestly with `fuseBitsPerKey(n, width)`, or the [sizing guide](https://distillate.akxp.net/guides/sizing/).
|
|
96
|
+
|
|
95
97
|
Also: `toBytes` / `fromBytes`. No `add` / `delete`; rebuild `from` the new set to change membership.
|
|
96
98
|
|
|
97
99
|
## Performance
|
|
@@ -116,7 +118,7 @@ Design notes, the structure decision matrix, hashing, and the binary format live
|
|
|
116
118
|
- [serialization](https://distillate.akxp.net/reference/serialization/): the binary format spec
|
|
117
119
|
- [versioning](https://distillate.akxp.net/reference/versioning/): SemVer policy and supported-runtime baseline
|
|
118
120
|
- [architecture](./docs/architecture.md), [hashing](./docs/hashing.md): contributor notes, on GitHub
|
|
119
|
-
- [API reference](https://distillate.akxp.net/api/
|
|
121
|
+
- [API reference](https://distillate.akxp.net/api/overview/): generated from TSDoc at site build time (per entry point)
|
|
120
122
|
|
|
121
123
|
## License
|
|
122
124
|
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "distillate",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Probabilistic data structures for JavaScript. Space-efficient, approximate-membership filters (Bloom, Blocked Bloom, Binary Fuse) with tunable error and a portable binary format; zero dependencies, universal.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bloom-filter",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/akshay-xp/distillate.git"
|
|
21
21
|
},
|
|
22
|
-
"homepage": "https://
|
|
22
|
+
"homepage": "https://distillate.akxp.net",
|
|
23
23
|
"type": "module",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"exports": {
|