anchor.diff:      #field{opts=FOpts} = FieldDef,
       FieldDefAsNonpacked = FieldDef#field{opts = FOpts -- [packed]},
       [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]),
  +     f("    ~p(Rest, N+7, X bsl N + Acc, Msg);~n", [DecodePackWrapFn]),
        f("~p(<<0:1, X:7, Rest/binary>>, N, Acc, #~p{~p=AccSeq}=Msg) ->~n",
          [DecodePackWrapFn, MsgName, FName]),
  -     f("    Len = X bsl (N*7) + Acc,~n"),
  +     f("    Len = X bsl N + Acc,~n"),
        f("    <<PackedBytes:Len/binary, Rest2/binary>> = Rest,~n"),
        f("    NewSeq = ~p(PackedBytes~sAccSeq),~n",
          [mk_fn(d_packed_field_, MsgName, FName),
  
positive.code: 
  format_dpacked_vi(MsgName, #field{name=FName, type=Type}, Opts) ->
      FnName = mk_fn(d_packed_field_, MsgName, FName),
      BValueExpr = "X bsl (N*7) + Acc",
      {FValueCode, RestVar} = mk_unpack_vi(4, "FValue", BValueExpr, Type, "Rest",
                                           Opts),
      [f("~p(<<1:1, X:7, Rest/binary>>, N, Acc, AccSeq) ->~n", [FnName]),
       f("    ~p(Rest, N+1, X bsl (N*7) + Acc, AccSeq);~n", [FnName]),
       f("~p(<<0:1, X:7, Rest/binary>>, N, Acc, AccSeq) ->~n", [FnName]),
       f("~s", [FValueCode]),
       f("    ~p(~s, 0, 0, [FValue | AccSeq]);~n", [FnName, RestVar]),
  
negative.code: format_length_delimited_skipper(MsgName) ->
      SkipFn = mk_fn(skip_length_delimited_, MsgName),
      [f("~p(<<1:1, X:7, Rest/binary>>, N, Acc, Msg) ->~n", [SkipFn]),
       f("    ~p(Rest, N+7, X bsl N + Acc, Msg);~n", [SkipFn]),
       f("~p(<<0:1, X:7, Rest/binary>>, N, Acc, Msg) ->~n", [SkipFn]),
       f("    Length = X bsl N + Acc,~n"),
       f("    <<_:Length/binary, Rest2/binary>> = Rest,~n"),
       f("    ~p(Rest2, 0, 0, Msg).~n~n", [mk_fn(d_read_field_def_, MsgName)])].
  
  