caiocdcs/probz
A Zig library for probabilistic data structures, like Bloom Filter, HyperLogLog, etc.
Zig library for probabilistic data structures.
Data Structures
Bloom Filter
Scalable Bloom Filter
Counting Bloom Filter
Quotient filter
Cuckoo Filter
HyperLogLog
q-digest
t-digest
Top-K
Count-min sketch
Locality–Sensitive Hashing
Run the following command to add the package to your project.
zig fetch --save git+https://github.com/caiocdcs/probz#main
Then add it as an import in your build.zig
file.
const probz = b.dependency("probz", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("probz", probz.module("probz"));
See the examples/
directory for complete working examples of all data structures:
# Run specific example
zig build run-example -- bloom_filter
# Run all examples
zig build run-examples
# See available examples
zig build --help
Feel free to open an issue or make a PR.