anchor.diff:      #bloom{size = BitSize, filter = Filter, hfs = Hfs, items_count = ItemsCount}.
   
   %% @doc Creates a new bloom filter.
  --spec new_(BitSize::pos_integer(), ?REP_HFS:hfs()) -> bloom_filter().
  -new_(BitSize, Hfs) ->
  +-spec new(BitSize::pos_integer(), ?REP_HFS:hfs()) -> bloom_filter().
  +new(BitSize, Hfs) ->
       NewSize = resize(BitSize, 8),
       ?DBG_ASSERT((NewSize rem 8) =:= 0),
       #bloom{size = NewSize, hfs = Hfs, items_count = 0}.
  
positive.code: 
  -include("scalaris.hrl").
  
  -export([new_fpr/2, new_fpr/3, new_bpi/3, new_bin/3,
           add/2, add_list/2, is_element/2, item_count/1]).
  -export([equals/2, join/2, print/1]).
  
  % for tests:
  
negative.code:         -> bloom_filter().
  new_fpr(MaxItems, FPR, Hfs) ->
      Size = calc_least_size(MaxItems, FPR, ?REP_HFS:size(Hfs)),
      new(Size, Hfs).
  
  %% @doc Creates a new bloom filter with the given hash function set and a fixed
  %%      number of bits per item.
  -spec new_bpi(MaxItems::non_neg_integer(), BitsPerItem::number(), ?REP_HFS:hfs())
          -> bloom_filter().
  new_bpi(MaxItems, BitPerItem, Hfs) ->
      new(util:ceil(BitPerItem * MaxItems), Hfs).
  
  %% @doc Creates a new bloom filter with the given binary, hash function set and
  %%      item count.
  