anchor.diff:  %% RFC 2671: Extension Mechanisms for DNS (EDNS0)
   %% RFC 2782: A DNS RR for specifying the location of services (DNS SRV)
   %% RFC 2915: The Naming Authority Pointer (NAPTR) DNS Resource Rec
  +%% RFC 6488: DNS Certification Authority Authorization (CAA) Resource Record
  +%% RFC 7553: The Uniform Resource Identifier (URI) DNS Resource Record
   
   -export([decode/1, encode/1]).
   
  
positive.code: 	    %% programming errors easier to locate.
  	    erlang:error(badarg, [Label,Name,N])
      end.
  
  %% Just lowercase ASCII A..Z
  to_lower([C | Cs]) when $A =< C, C =< $Z ->
      [C + 32 | to_lower(Cs)];
  to_lower([C | Cs]) ->
      [C | to_lower(Cs)];
  to_lower([]) ->
      [].
  
  %%
  %% Data field -> {binary(),NewCompressionTable}
  
negative.code:     (1 =< L andalso L =< 15)
          orelse throw(?DECODE_ERROR),
      Value = binary_to_list(Data1),
      {Flags,inet_db:tolower(Tag),Value};
  %% sofar unknown or non standard
  decode_data(Data, _, _, _) ->
      Data.
  