anchor.diff:  -include_lib("kernel/include/file.hrl").
   -include("bksw_obj.hrl").
   
  +-define(MAGIC_NUMBER, <<16#b00c:16/integer>>).
   -define(MAGIC_NUMBER_SIZE_BYTES, 2).
   -define(CHECKSUM_SIZE_BYTES, 16).
   -define(TOTAL_HEADER_SIZE_BYTES, ?MAGIC_NUMBER_SIZE_BYTES + ?CHECKSUM_SIZE_BYTES).
  
positive.code:         {ok, Fd} ->
              case file:read(Fd, 2) of
                  %% Verify magic number is intact
                  {ok, <<16#b00c:16/integer>>} ->
                      %% Skip past checksum data for now
                      {ok, ?TOTAL_HEADER_SIZE_BYTES} = file:position(Fd, {bof, ?TOTAL_HEADER_SIZE_BYTES}),
                      {ok, #entryref{fd=Fd, path=FileName}};
  
negative.code:     case file:open(FileName, [exclusive, write, binary]) of
          {ok, Fd} ->
              %% Magic number to guard against file corruption
              case file:write(Fd, ?MAGIC_NUMBER) of
                  ok ->
                      {ok, ?TOTAL_HEADER_SIZE_BYTES} = file:position(Fd, {bof, ?TOTAL_HEADER_SIZE_BYTES}),
                      {ok, #entryref{fd=Fd, path=FileName, ctx=erlang:md5_init()}};
  