anchor.diff:          Dir -> Dir
       end.
   
  +-spec build_index(ip_lists(), pos_integer()) -> idx_resource().
   build_index(IpLists, LargeListThreshold) ->
       build_index_nif(IpLists, LargeListThreshold).
   
  +-spec async_build_index(ip_lists(), pos_integer()) -> idx_resource().
   async_build_index(IpLists, LargeListThreshold) ->
       {Ref, Tid} = async_start_build_index_nif(IpLists, LargeListThreshold),
       receive
  
positive.code: parse_ip(Ip) when is_list(Ip) ->
      parse_ip(list_to_binary(Ip)).
  
  index_info(_Index) ->
      {error, ip_index_nif_not_loaded}.
  
  lookup_subnet(Index, Ip, Mask) when is_integer(Mask), Mask >= 8, Mask =< 32 ->
      lookup_subnet_nif(Index, parse_ip(Ip), Mask).
  
  lookup_ip(Index, Ip) ->
      lookup_subnet(Index, Ip, 32).
  
  build_index_nif(_IpLists, _LargeListThreshold) ->
      {error, ip_index_nif_not_loaded}.
  
  lookup_subnet_nif(_Index, _Ip, _Offset) ->
      {error, ip_index_nif_not_loaded}.
  
  async_start_build_index_nif(_Lists, _LargeListThreshold) ->
      {error, ip_index_nif_not_loaded}.
  
  async_finish_build_index_nif(_Tid) ->
      {error, ip_index_nif_not_loaded}.
  
negative.code: ]).
  
  -on_load(init/0).
  
  -type ip_lists() :: list({integer(), integer(), binary()}).
  -type ip_address() :: binary() | string() | {0..255,0..255,0..255,0..255}.
  -type mask() :: 8..32.
  -type idx_resource() :: binary().
  
  -spec init() -> ok.
  init() ->
  