anchor.diff:  -type index() :: gululog_idx:index().
   -type w_cur() :: gululog_w_cur:cursor().
   
  +-define(MINIMUM_SEG_MB, 100). %% mininum segment size in MB
  +-define(DEFAULT_SEG_MB, ?MINIMUM_SEG_MB). %% default segment size in MB
  +
   -define(RECORD_TO_PROPLIST(RECORD_NAME, THE_TUPLE),
           {RECORD_NAME,
            lists:zip(record_info(fields, RECORD_NAME),
  
positive.code: %%       4. open writer cursor
  do_init(State) -> State.
  
  keyget(Key, KvList) ->
    {Key, Value} = lists:keyfind(Key, 1, KvList),
    Value.
  
  -spec maybe_close_index(?undef | index()) -> ok.
  maybe_close_index(?undef) -> ok;
  
negative.code: -define(FIELD_ERR(RECORD_NAME, FIELD_NAME),
          erlang:error({field_value_missing, RECORD_NAME, FIELD_NAME})).
  
  -define(ST_FIELD_ERR(FIELD_NAME), ?FIELD_ERR(state, FIELD_NAME)).
  
  -record(state,
          { dir   = ?ST_FIELD_ERR(dir)   :: dirname()        %% index / segment file location
          , segMB = ?ST_FIELD_ERR(segMB) :: bytecnt()        %% segment file size limit in MB
          , index                        :: ?undef | index() %% index
          , w_cur                        :: ?undef | w_cur() %% writer causor
          }).
  
  %%%*_ API FUNCTIONS ============================================================
  
  start(Options) ->
    gen_server:start(?MODULE, Options, []).
  
  