You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+14-17Lines changed: 14 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,29 +35,31 @@ go get github.com/dsa0x/sprout
35
35
36
36
### Usage
37
37
38
-
sprout contains implementation of both the normal and scalable bloom filter via the methods below:
38
+
Sprout contains implementation of both the normal and scalable bloom filter via the methods below:
39
39
40
40
```go
41
41
opts:= &sprout.BloomOptions{
42
42
Err_rate: 0.001,
43
43
Capacity: 100000,
44
44
}
45
-
45
+
// Normal Bloom Filter
46
46
bf:= sprout.NewBloom(opts)
47
+
48
+
// Scalable Bloom Filter
47
49
sbf:= sprout.NewScalableBloom(opts)
48
50
```
49
51
50
52
#### With a persistent store
51
53
52
-
sprout supports boltdb and badgerdb as persistent store. Using them is very simple. sprout exposes methods that initializes the database and then they can be attached to the bloom filter
54
+
Sprout supports boltdb and badgerdb as persistent storage. Using them is very simple. Sprout exposes methods that initializes the database and then they can be attached to the bloom filter.
53
55
54
-
##### Using Boltdb
56
+
**Using Boltdb**
55
57
56
58
```go
57
59
// initialize boltdb
58
60
db:= sprout.NewBolt("/tmp/test.db", 0600)
59
61
60
-
//you can also setup options supported by bolt to configure your store
62
+
//the bolt store can be configured as defined in the boltdb documentations
0 commit comments