bloomfilter 1.2.6.2 → 1.2.6.3
raw patch · 2 files changed
+7/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/BloomFilter.hs +6/−1
- bloomfilter.cabal +1/−1
Data/BloomFilter.hs view
@@ -142,7 +142,8 @@ -- | Create a new mutable Bloom filter. For efficiency, the number of -- bits used may be larger than the number requested. It is always--- rounded up to the nearest higher power of two.+-- rounded up to the nearest higher power of two, but clamped at a+-- maximum of 4 gigabits, since hashes are 32 bits in size. -- -- For a safer creation interface, use 'createB'. To convert a -- mutable filter to an immutable filter for use in pure code, use@@ -152,6 +153,7 @@ -> ST s (MBloom s a) newMB hash numBits = MB hash shift mask `liftM` newArray numElems numBytes where twoBits | numBits < 1 = 1+ | numBits > maxHash = maxHash | isPowerOfTwo numBits = numBits | otherwise = nextPowerOfTwo numBits numElems = max 2 (twoBits `shiftR` logBitsInHash)@@ -160,6 +162,9 @@ shift = logPower2 trueBits mask = trueBits - 1 isPowerOfTwo n = n .&. (n - 1) == 0++maxHash :: Int+maxHash = 4294967296 -- fromIntegral (maxBound :: Hash) logBitsInHash :: Int logBitsInHash = 5 -- logPower2 bitsInHash
bloomfilter.cabal view
@@ -1,5 +1,5 @@ name: bloomfilter-version: 1.2.6.2+version: 1.2.6.3 license: BSD3 license-file: LICENSE author: Bryan O'Sullivan <bos@serpentine.com>