anchor.diff:  reindex_chunk(IO, File, Set) ->
       fold_idx(fun({entry, M}, Acc) ->
                        ok = file:write(IO, <<(byte_size(M)):16/integer, M/binary>>),
  -                     btrie:append(M, t, Acc);
  +                     btrie:store(M, Acc);
                   (_, Acc) ->
                        Acc
                end, Set, File).
  
positive.code:     case btrie:find(Metric, Idx) of
          error ->
              {error, not_found};
          {ok, [Pos]} ->
              Base = Pos * S * DataSize,
              P = Base+((Position - Offset) * DataSize),
              file:pread(F, P, Count * DataSize)
  
negative.code:     fold_idx(fun({init, Offset, Size}, undefined) ->
                       {Offset, Size, btrie:new(), 0};
                  ({entry, M}, {Offset, Size, T, I}) ->
                       {Offset, Size, btrie:store(M, I, T), I+1}
               end, undefined, F).
  fold_idx(Fun, Acc0, F) ->
      fold_idx(Fun, Acc0, 4*1024, F).
  