Research Article

Accurate Counting Bloom Filters for Large-Scale Data Processing

Algorithm 2

Insertion operation in ACBF.
(1) Insert (Element )
(2) for ( ; <= ; ++) do
# Traverse bitmaps
(3) for ( ; <= ; ++) do
(4)  if ( == 1) then
(5)   index = mod ;
(6)  end if
(7)  if ( [index] == 1) then
(8)   offset = popcount( , index);
(9)   index = offset;
# Expand bitmap by one position
(10)    else
(11)     [index] = 1;
(12)    offset = popcount( , index);
(13)    expand_bitmap( , offset);
(14)    Index = offset;
(15)     [index] = 0;
(16)    exit();
(17)    end if
(18)  end for
(19) end for