Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedang/bloomclj
A Bloom Filter implementation in Clojure
https://github.com/vedang/bloomclj
bloom-filter clojure
Last synced: about 2 months ago
JSON representation
A Bloom Filter implementation in Clojure
- Host: GitHub
- URL: https://github.com/vedang/bloomclj
- Owner: vedang
- License: epl-1.0
- Created: 2013-09-09T13:56:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-18T18:55:13.000Z (over 7 years ago)
- Last Synced: 2024-11-02T04:51:50.401Z (2 months ago)
- Topics: bloom-filter, clojure
- Language: Clojure
- Size: 98.6 KB
- Stars: 20
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bloomclj
A Bloom Filter implementation in Clojure.
## Usage
```clj
[me.vedang/bloomclj "0.0.2"]
```You can find the annotated docs for Bloomclj [here](http://vedang.me/bloomclj/)
### Using a simple Bloom Filter
```clj
user> (require '[bloomclj.core
:refer [add maybe-contains? clear]])
nil
user> (require '[bloomclj.transient
:refer [transient-bloom-filter]])
nil
user> (transient-bloom-filter 100000 0.01)
#
user> (def tbf *1)
#'user/tbf
user> (add tbf "hello")
"OK"
user> (add tbf "world")
"OK"
user> (maybe-contains? tbf "hello")
true
user> (maybe-contains? tbf "goodbye")
false
user> (clear tbf)
"OK"
user> (maybe-contains? tbf "hello")
false
user>
```### Using other backing stores
An example implementation of a Redis Backed Bloom Filter is provided [here](http://vedang.me/bloomclj/#bloomclj.redis-backed).
## Contributors
- Vedang Manerikar ([@vedang](https://github.com/vedang))
- Kiran Kulkarni ([@kirankulkarni](https://github.com/kirankulkarni))
- Chris Truter ([@crisptrutski](https://github.com/crisptrutski))## License
Copyright © 2013 Vedang Manerikar
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.