anchor.diff:              end],
           ",\n")).
   
  -format_msg_decoders(Defs) ->
  -    [format_msg_decoder(MsgName, MsgDef) || {{msg, MsgName}, MsgDef} <- Defs].
  -
  -format_msg_decoder(MsgName, MsgDef) ->
  +format_msg_decoders(Defs, Opts) ->
  +    [format_msg_decoder(MsgName, MsgDef, Opts)
  +     || {{msg, MsgName}, MsgDef} <- Defs].
  +
  +format_msg_decoder(MsgName, MsgDef, Opts) ->
       [format_msg_decoder_read_field(MsgName, MsgDef),
        format_msg_decoder_reverse_toplevel(MsgName, MsgDef),
  -     format_field_decoders(MsgName, MsgDef),
  +     format_field_decoders(MsgName, MsgDef, Opts),
        format_field_adders(MsgName, MsgDef),
        format_field_skippers(MsgName),
        format_msg_merger(MsgName, MsgDef)].
  
positive.code:     "0, 0". %% length of packed bytes is varint-based
  
  
  format_field_decoders(MsgName, MsgDef) ->
      [[format_field_decoder(MsgName, FieldDef), "\n"]
       || FieldDef <- MsgDef].
  
  format_field_decoder(MsgName, #field{is_packed=false, type=Type}=FieldDef) ->
      case Type of
          sint32   -> format_vi_based_field_decoder(MsgName, FieldDef);
          sint64   -> format_vi_based_field_decoder(MsgName, FieldDef);
          int32    -> format_vi_based_field_decoder(MsgName, FieldDef);
          int64    -> format_vi_based_field_decoder(MsgName, FieldDef);
          uint32   -> format_vi_based_field_decoder(MsgName, FieldDef);
          uint64   -> format_vi_based_field_decoder(MsgName, FieldDef);
          bool     -> format_vi_based_field_decoder(MsgName, FieldDef);
          {enum,_} -> format_vi_based_field_decoder(MsgName, FieldDef);
          fixed32  -> format_uf32_field_decoder(MsgName, FieldDef);
          sfixed32 -> format_sf32_field_decoder(MsgName, FieldDef);
          float    -> format_float_field_decoder(MsgName, FieldDef);
          fixed64  -> format_uf64_field_decoder(MsgName, FieldDef);
          sfixed64 -> format_sf64_field_decoder(MsgName, FieldDef);
          double   -> format_double_field_decoder(MsgName, FieldDef);
          string   -> format_vi_based_field_decoder(MsgName, FieldDef);
          bytes    -> format_vi_based_field_decoder(MsgName, FieldDef);
          {msg,_}  -> format_vi_based_field_decoder(MsgName, FieldDef)
      end;
  format_field_decoder(MsgName, #field{is_packed=true, name=FName}=FieldDef) ->
      DecodePackWrapFn = mk_fn(d_field_, MsgName, FName),
      [f("~p(<<1:1, X:7, Rest/binary>>, N, Acc, Msg) ->~n", [DecodePackWrapFn]),
       f("    ~p(Rest, N+1, X bsl (N*7) + Acc, Msg);~n", [DecodePackWrapFn]),
  
negative.code: %%
  %% Indent the code to Indent spaces.
  %% The resulting code contains one or more statements that ends with comma.
  mk_unpack_vi(Indent, FValueVar, BValueExpr, Type, RestVar, Opts) ->
      Rest2Var = RestVar ++ "2",
      case Type of
          sint32 ->
  