anchor.diff:      p6uuid:parse(UUID);
   encode_type(secid,SecID) when is_binary(SecID) ->
       SecID;
  -encode_type(bytes,Bytes) when is_binary(Bytes)->
  -    [encode_varint(size(Bytes)),Bytes];
   encode_type(string,String) when is_tuple(String) ->
       encode_type(string,p6str:mkstr("~p",String));
   encode_type(string,String) when is_list(String) ->
  
positive.code: encode_type(string,String) when is_binary(String)->
      [encode_varint(size(String)),String].
  
  encode_array(Data) ->
      encode_array(Data,0,[]).
  
  encode_array([],Sz,Acc) ->
      [encode_type(varint32,Sz),lists:reverse(Acc)];
  encode_array([Item|Items],Sz,Acc) ->
      encode_array(Items,Sz+1,[encode_obj(Item)|Acc]).
  
  encode_map(Data) ->
      encode_map(Data,0,[]).
  
  encode_map([],Sz,Acc) ->
      [encode_varint(Sz),Acc];
  encode_map([{K,V}|Tail],Sz,Acc) ->
      encode_map(Tail,Sz+1,[encode_obj(K),encode_obj(V)|Acc]).
  
  encode_uuid(Bin) when is_binary(Bin) ->
      Bin;
  
negative.code:     <<Float:32/float>>;
  encode_type(double,Double) ->
      <<Double:64/float>>;
  encode_type(date,D) ->
      encode_svarint(D);
  encode_type(byte,B) ->
  