https://github.com/creadone/cbloom
Sharded Bloom Filter
https://github.com/creadone/cbloom
Last synced: 11 months ago
JSON representation
Sharded Bloom Filter
- Host: GitHub
- URL: https://github.com/creadone/cbloom
- Owner: creadone
- License: mit
- Created: 2022-08-29T19:22:55.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-21T17:20:51.000Z (over 3 years ago)
- Last Synced: 2025-02-21T20:36:21.075Z (over 1 year ago)
- Language: Crystal
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cbloom
Sharded Bloom Filter with hash generation for use on my internal project. Cbloom is cluster of 32bit Bloom filters that can be flushed on drive. It work through socket (see /lua/cbloom.lua). Cbloom is needed to quickly generate a large number of unique hashes and nothing else.
## Installation
`shards install & shards build --release`
## Usage
```
Usage: cbloom [arguments]
-d PATH, --directory=PATH Path to directory where bitmaps are stored
-s INT, --shards=INT Number of bloom filter shards
-e FLOAT, --probability=FLOAT Probability of false positives
-i INT, --item=INT Max number of items
-h, --help Show this help
```
## Usage
**Run**
```sh
./bin/cbloom -d ./bitmaps -s 5 -i 1000000 -e 0.01
```
**Call**
```lua
local cbloom = require('cbloom')
cbloom.setup('/var/run/cbloom.sock')
print(cbloom.get())
```
## Contributors
- [creadone](https://github.com/creadone) - creator and maintainer