anchor.diff:      binary_to_integer(B2);
   int_offset(_) ->
       throw("error in binary offset").
  +
  +%%
  +%% Redis proto funcs
  +%%
  +
  +%% Short func to redis proto size element.
  +%% 1 -> <<"$1">>.
  +rsize(N) when is_integer(N) ->
  +    redis_int_to_bin(36, N);
  +rsize(_) ->
  +    error.
  +%% Short func to redis proto length element.
  +%% 1 -> <<"*1">>
  +rlen(N) when is_integer(N) ->
  +    redis_int_to_bin(42, N);
  +rlen(_) ->
  +    error.
  +
  +redis_int_to_bin(Char, N) ->
  +    S = lists:flatten([Char, i2l(N)]),
  +    l2b(S).
  
positive.code:     {error, "invalid pid to load rdb"}.
  
  rdb_save(Data, _Mode) when is_binary(Data), is_integer(_Mode) ->
      rdb:save(Data, ?RDB_FILE);
  rdb_save(_, _) ->
      {error, "invalid rdb data"}.
  
negative.code:     gen_server:cast(self(), {save_rdb, Bulk}),
      {noreply, S#state{state=payload}}; % Next state will be 'payload'
  handle_recv({error, Reason}, S) ->
      {stop, socket_err, {S, Reason}};
  handle_recv(_, _) ->
      {stop, invalid_pmatch}.
  
  
  initial() ->
  