| 50 | } |
| 51 | |
| 52 | void BloomStore::reset(int64_t newLength) { |
| 53 | backingFile.truncate(0); |
| 54 | backingFile.truncate((newLength + BlockSize - 1) / BlockSize); |
| 55 | length = newLength; |
| 56 | } |
| 57 | |
| 58 | int64_t calculateLength(int64_t maxItems, double fpRate) { |
| 59 | return static_cast<int64_t>(std::ceil(-(std::log(fpRate) * maxItems) / Log2Squared)); |
nothing calls this directly
no test coverage detected