code: @Override
    protected void tryReset(boolean added) {
      additions += step;
  
      if (!added) {
        return;
      }
  
      if (additions < period) {
        return;
      }
  
      int count = 0;
      for (int i = 0; i < table.length; i++) {
        count += Long.bitCount(table[i] & ONE_MASK);
        table[i] = (table[i] >>> 1) & RESET_MASK;
      }
      additions = (additions >>> 1) - (count >>> 2);
      doorkeeper.clear();
    }
docs: Reduces every counter by half of its original value. To reduce the truncation
  error, the sample is reduced by the number of counters with an odd value.