mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-13 17:00:18 +08:00
update
This commit is contained in:
parent
9e06ed4b5e
commit
418b9c4045
@ -70,7 +70,7 @@ func (b *Bloom) M() uint {
|
||||
func (b *Bloom) Contains(data []byte) bool {
|
||||
for i := 0; i < int(b.k); i++ {
|
||||
hashCode := uint(HashFunc(data, uint32(i)))
|
||||
if !b.m.GetBit(hashCode & b.m.BitLength()) {
|
||||
if !b.m.GetBit(hashCode % b.m.BitLength()) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user