anchor.diff:  decode_nsec_types(Bin) when is_binary(Bin) -> decode_nsec_types(Bin, []).
   
   decode_nsec_types(<<>>, Types) -> lists:reverse(Types);
  -decode_nsec_types(<<WindowNum:8, BMPLength:8, BMP:BMPLength/binary, Rest/binary>>, Types) ->
  +decode_nsec_types(<<WindowNum:8, BMPLength:8, BMP:BMPLength/binary,
  +		    Rest/binary>>, Types) ->
       BaseNo = WindowNum * 256,
       NewTypes = decode_nsec_types(BaseNo, BMP, Types),
       decode_nsec_types(Rest, NewTypes).
  
positive.code: 
  decode_nxt_bmp(_Offset, <<>>, Types) -> lists:reverse(Types);
  decode_nxt_bmp(Offset, <<1:1, Rest/bitstring>>, Types) ->
      decode_nxt_bmp(Offset + 1, Rest, [Offset|Types]);
  decode_nxt_bmp(Offset, <<0:1, Rest/bitstring>>, Types) ->
      decode_nxt_bmp(Offset + 1, Rest, Types).
  
  encode_nxt_bmp(UnsortedTypes) when is_list(UnsortedTypes) ->
      Types = lists:sort(sets:to_list(sets:from_list(UnsortedTypes))),
      encode_nxt_bmp(0, Types, <<>>).
  
  encode_nxt_bmp(_LastType, [], BMP) -> pad_bmp(BMP);
  
negative.code:     const_compare(A, B, Result bor (C1 bxor C2)).
  
  round_pow(N, E) -> round(math:pow(N, E)).
  
  unique_list(List) when is_list(List) ->
      lists:sort(sets:to_list(sets:from_list(List))).
  