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:          terminate/2,
           code_change/3]).
  
  -define(RDB_FILE, "/tmp/master/dump3.rdb").
  -define(BS, <<" ">>). % Binary blank space
  -define(CRLF, <<"\r\n">>).
  
  
negative.code:         {error, Reason} -> % BUG in here!!
              {stop, socket_err, {S, Reason}}
      end;
  
  handle_sock(ok, S = #state{socket=Sock, state=reconnect2}) ->
      case recv_sock(Sock) of
          {ok, _} ->
              gen_server:cast(self(), bar),
              {noreply, S#state{state=reconnect3}};
          {error, Reason} ->
              {stop, socket_err, {S, Reason}}
      end;
  %% Receive the payload from de synchronization command 'sync'
  handle_sock(ok, S = #state{socket=Sock, state=load, mode=sync}) ->
      io:format("getting payload sync ~n"),
  