anchor.diff:          false ->
               error(badarg);
           true ->
  -            (Elements band piecemask(PieceIndex, Size)) > 0
  +            PaddingLen = paddinglen(PieceIndex + 1),
  +            <<_:PieceIndex, Status:1, _:PaddingLen, _/binary>> = Elements,
  +            Status > 0
       end.
   
   %% @doc
  
positive.code:         false ->
              error(badarg);
          true ->
              NewElements = Elements bor piecemask(PieceIndex, Size),
              Pieceset#pieceset{elements=NewElements}
      end.
  
  %% @doc
  
negative.code: %% @end
  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
  %% be padded with at most 7 bits set to zero.
  %% @end
  to_binary(Pieceset) ->
      #pieceset{elements=Elements} = Pieceset,
      Elements.
  
  %% @doc
  %% Returns true if the piece is a member of the piece set,
  