anchor.diff:  -define(API_VERSION, 1).
   -define(CAPABILITIES, []).
   
  +%% Borrowed from bitcask.hrl
  +-define(VALSIZEFIELD, 32).
  +-define(CRCSIZEFIELD, 32).
  +-define(HEADER_SIZE,  8). % Differs from bitcask.hrl!
  +-define(MAXVALSIZE, 2#11111111111111111111111111111111).
  +
   -ifdef(TEST).
   -include_lib("eunit/include/eunit.hrl").
   -endif.
  
positive.code: get(Bucket, Key, State) ->
      File = location(State, {Bucket, Key}),
      case filelib:is_file(File) of
          false -> {error, not_found, State};
          true -> {ok, element(2, file:read_file(File)), State}
      end.
  
  %% @spec atomic_write(File :: string(), Val :: binary()) ->
  
negative.code: nest([],N,Acc) ->
      nest([],N-1,["0"|Acc]).
  
  %% Borrowed from bitcask_fileops.erl and then mangled
  -spec pack_ondisk(binary()) -> binary().
  pack_ondisk(Bin) ->
      ValueSz = size(Bin),
      true = (ValueSz =< ?MAXVALSIZE),
      Bytes0 = [<<ValueSz:?VALSIZEFIELD>>, Bin],
      [<<(erlang:crc32(Bytes0)):?CRCSIZEFIELD>> | Bytes0].
  
  -spec unpack_ondisk(binary()) -> binary() | bad_crc.
  unpack_ondisk(<<Crc32:?CRCSIZEFIELD/unsigned, Bytes/binary>>) ->
      case erlang:crc32(Bytes) of
          Crc32 ->
              <<ValueSz:?VALSIZEFIELD, Value:ValueSz/bytes>> = Bytes,
              Value;
          _BadCrc ->
              bad_crc
      end.
  
  %%
  %% Test
  %%
  