anchor.diff:          false ->
               error(badarg);
           true ->
  -            PaddingLen = paddinglen(Size0),
  -            <<E0:Size0, 0:PaddingLen>> = Elements0,
  -            <<E1:Size0, 0:PaddingLen>> = Elements1,
  +            <<E0:Size0>> = Elements0,
  +            <<E1:Size1>> = Elements1,
               Shared = E0 band E1,
  -            Intersection = <<Shared:Size0, 0:PaddingLen>>,
  +            Intersection = <<Shared:Size0>>,
               #pieceset{size=Size0, elements=Intersection}
       end.
   
  
positive.code: %% @end
  -spec from_binary(binary(), non_neg_integer()) -> pieceset().
  from_binary(Bin, Size) when is_binary(Bin) ->
      PaddingLen = paddinglen(Size),
      <<_:Size, PaddingValue:PaddingLen>> = Bin,
      %% All bits used for padding must be set to 0
      case PaddingValue of
          0 -> ok;
          _ -> error(badarg)
      end,
      #pieceset{size=Size, elements=Bin}.
  
  %% @doc
  %% Convert a piece set to a bitfield, the bitfield will
  
negative.code: -spec is_empty(pieceset()) -> boolean().
  is_empty(Pieceset) ->
      #pieceset{size=Size, elements=Elements} = Pieceset,
      <<Memberbits:Size>> = Elements,
      Memberbits == 0.
  
  %% @doc
  