anchor.diff:  
   parse_flag(Code, L) ->
       % flags are represeted as booleans
  -    case parse_opt_field(Code, fun parse_bool/1, L) of
  +    case parse_optional_field(Code, fun parse_bool/1, L) of
           {'undefined', Rest} -> {false, Rest};
           X = {true, _Rest} -> X;
           {false, _} -> throw_error({'invalid_flag_encoding', Code})
       end.
   
   
  -parse_rep_field(Code, ParseValue, L) ->
  +parse_repeated_field(Code, ParseValue, L) ->
       {Fields, Rest} = find_fields(Code, L),
       Res = [ ParseValue(X) || X <- Fields ],
       {Res, Rest}.
   
   
  +parse_packed_repeated_field(Code, ParseValue, L) ->
  +    {Fields, Rest} = find_fields(Code, L),
  +    Res = [ parse_packed_field(ParseValue, X) || X <- Fields ],
  +    {lists:append(Res), Rest}.
  +
  +
  +parse_packed_field(ParseValue, {'block', Bytes}) ->
  +    parse_packed_values(ParseValue, Bytes, _Accu = []).
  +
  +
  +parse_packed_values(_ParseValue, <<>>, Accu) ->
  +    lists:reverse(Accu);
  +parse_packed_values(ParseValue, Bytes, Accu) ->
  +    {X, Rest} = ParseValue(Bytes),
  +    parse_packed_values(ParseValue, Rest, [X|Accu]).
  +
  +
   % XXX, TODO: print warnings on unrecognized fields
   check_unparsed_fields(_L) -> ok.
   
  
positive.code:     [encode_field_tag(Code, ?TYPE_64BIT), <<X:64/little-integer>>].
  
  
  float_to_fixed64(Code, X) when is_float(X) ->
      [encode_field_tag(Code, ?TYPE_64BIT), <<X:64/little-float>>];
  float_to_fixed64(Code, X) when is_integer(X) ->
      float_to_fixed64(Code, X + 0.0).
  
  
  float_to_fixed32(Code, X) when is_float(X) ->
      [encode_field_tag(Code, ?TYPE_32BIT), <<X:32/little-float>>];
  float_to_fixed32(Code, X) when is_integer(X) ->
      float_to_fixed32(Code, X + 0.0).
  
  
  binary_to_block(Code, X) when is_binary(X) ->
      [encode_field_tag(Code, ?TYPE_STRING), encode_varint(size(X)), X].
  
  
  string_to_block(Code, X) when is_list(X); is_binary(X) ->
      Utf8_bytes = unicode:characters_to_binary(X),
      binary_to_block(Code, Utf8_bytes).
  
  
  %
  
negative.code: 
  encode_field_tag(Code, FieldType)
          when is_integer(Code) andalso (Code band 16#3fffffff =:= Code) ->
      encode_varint_value((Code bsl 3) bor FieldType);
  
  encode_field_tag('undefined', FieldType) ->
      % 1 is the default code for top-level primitive types
  