add method

void add(
  1. Uint8List key
)

Adds key to the filter.

Implementation

void add(Uint8List key) {
  final h1 = VxsCrc32c.compute(key);
  final h2 = ((h1 >>> 16) ^ (h1 & 0xFFFF)) | 1;
  for (var i = 0; i < hashCount; i++) {
    final bit = (h1 + i * h2) % bitCount;
    bits[bit >> 3] |= 1 << (bit & 7);
  }
}