Skip to content

Commit 6798d1e

Browse files
committed
Update README
1 parent 4c23865 commit 6798d1e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,31 @@ False
9898
True
9999
```
100100

101+
### Merging two filters: ###
102+
Create first filter:
103+
```
104+
>>> from fastBloomFilter import bloom
105+
>>> bf1 = bloom.BloomFilter(array_size=1024**3)
106+
>>> bf1.add("1")
107+
```
108+
Create second filter:
109+
```
110+
>>> from fastBloomFilter import bloom
111+
>>> bf2 = bloom.BloomFilter(array_size=1024**3)
112+
>>> bf2.add("2")
113+
```
114+
Merge the two filters into a third filter:
115+
```
116+
>>> bf3 = bf1 + bf2
117+
```
118+
Check the elements in the third filter:
119+
```
120+
>>> print(bf3["1"])
121+
True
122+
>>> print(bf3["2"])
123+
True
124+
```
125+
101126
### Contributing ###
102127
```
103128
Contributons:

0 commit comments

Comments
 (0)