anchor.diff:  %% Maximum flat-size of the decoded terms.
   %% Prevents attacks where a decode can consume all available memory.
   -define(MAX_DECODE_SIZE, 10*1024*1024).
  -
  -bug() ->
  -    C = decode("{'abc"),
  -    decode("d'}$", C).
   
   %% Decoding rules
   %% {'#S', String} -> String
  
positive.code:         _ ->
              decode1(T, TS, Dict, MaxSize)
      end;
  get_stuff(<<$%,T/binary>>, $%, _L, Stack, Dict, MaxSize)  -> 
      decode1(T, Stack, Dict, MaxSize);
  get_stuff(<<H,T/binary>>, Stop, L, Stack, Dict, MaxSize) -> 
      get_stuff(T, Stop, <<L/binary, H>>, Stack, Dict, MaxSize);
  get_stuff(<<>>, Stop, L, Stack, Dict, MaxSize) ->
      {more, fun(I) ->           
             get_stuff(I, Stop, L, Stack, Dict, MaxSize) end}.
  
  collect_binary(0, T, L, Stack, Dict, MaxSize) ->
  
negative.code:     load_dict(Most, Free, Dict0, []).
  
  load_dict([{N,X}|T], [Key|T1], Dict0, L) when N > 0->
      load_dict(T, T1, dict:store(X, Key, Dict0),
            [encode_obj(X),">",Key|L]);
  load_dict(_, _, Dict, L) ->
      {Dict, L}.
  