anchor.diff:  
   %% @doc Creates a new bloom filter.
   -spec new_(BitSize::pos_integer(), ?REP_HFS:hfs()) -> bloom_filter().
  -new_(BitSize, Hfs) when (BitSize rem 8) =:= 0 ->
  -    #bloom{size = BitSize, hfs = Hfs, items_count = 0};
   new_(BitSize, Hfs) ->
       NewSize = resize(BitSize, 8),
       ?DBG_ASSERT((NewSize rem 8) =:= 0),
  -    #bloom{size = NewSize, hfs = Hfs, items_count = 0}.
  +    #bloom{filter = <<0:NewSize>>, hfs = Hfs, items_count = 0}.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
   %% @doc Adds one item to the bloom filter.
   -spec add(bloom_filter(), key()) -> bloom_filter().
  -add(#bloom{size = BFSize, hfs = Hfs, items_count = FilledCount,
  -           filter = Filter} = Bloom, Item) ->
  +add(#bloom{hfs = Hfs, items_count = FilledCount, filter = Filter} = Bloom,
  +    Item) ->
  +    BFSize = erlang:bit_size(Filter),
       Bloom#bloom{filter = p_add_list_v1(Hfs, BFSize, Filter, [Item]),
                   items_count = FilledCount + 1}.
   
   %% @doc Adds multiple items to the bloom filter.
   -spec add_list(bloom_filter(), [key()]) -> bloom_filter().
  -add_list(#bloom{size = BFSize,
  -           hfs = Hfs,
  -           items_count = FilledCount,
  -           filter = Filter
  -          } = Bloom, Items) ->
  +add_list(#bloom{hfs = Hfs, items_count = FilledCount, filter = Filter} = Bloom,
  +         Items) ->
       % choose version according to the number of elements to add:
       % when setting around 16*3 positions, V2 is faster
       MinLengthForV2 = erlang:max(1, (16 * 3) div ?REP_HFS:size(Hfs)),
  +    BFSize = erlang:bit_size(Filter),
       ItemsL = length(Items),
       F = if ItemsL >= MinLengthForV2 ->
                  p_add_list_v2(Hfs, BFSize, Filter, Items);
  
positive.code: %% Types
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  -record(bloom, {
                  size          = ?required(bloom, size):: pos_integer(),%bit-length of the bloom filter - requirement: size rem 8 = 0
                  filter        = <<>>                  :: binary(),         %length = size div 8
                  hfs           = ?required(bloom, hfs) :: ?REP_HFS:hfs(),   %HashFunctionSet
                  items_count   = 0                     :: non_neg_integer() %number of inserted items
                 }).
  
negative.code:     p_add_list_v2_(Rest, AccPosBF2, AccBF2, BF, BFSize);
  p_add_list_v2_([], AccPosBF, AccBF, BF, BFSize) ->
      RestBits = BFSize - erlang:bit_size(AccBF) - 8,
      <<AccBF2Nr:BFSize>> = <<AccBF/binary, AccPosBF:8, 0:RestBits>>,
      % merge AccBF2 and BF
      <<BFNr:BFSize>> = BF,
      ResultNr = AccBF2Nr bor BFNr,
      <<ResultNr:BFSize>>.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  