anchor.diff:  %% for C API (http://msgpack.sourceforge.jp/c:doc)
   %% except buffering functions (both copying and zero-copying).
   -export([pack/1, unpack/1, unpack_all/1]).
  +-export([pack_map/1]).
   
   % compile:
   % erl> c(msgpack).
  
positive.code: pack({Map}) when is_list(Map) ->
      pack_map(Map);
  pack(Map) when is_tuple(Map), element(1,Map)=:=dict ->
      pack_map(dict:from_list(Map));
  pack(_O) ->
      {error, undefined}.
  
  
negative.code: 	    [Term|unpack_all(Binary)]
      end.
  
  pack_map(M)->
      case length(M) of
  	Len when Len < 16 ->
  	    << 2#1000:4, Len:4/integer-unit:1, (pack_map_(M, <<>>))/binary >>;
  	Len when Len < 16#10000 -> % 65536
  	    << 16#DE:8, Len:16/big-unsigned-integer-unit:1, (pack_map_(M, <<>>))/binary >>;
  	Len ->
  	    << 16#DF:8, Len:32/big-unsigned-integer-unit:1, (pack_map_(M, <<>>))/binary >>
      end.
  
  % ===== internal APIs ===== %
  
  