anchor.diff:                      {{enum,e}, [{v1, 100},
                                   {v2, 150}]}]).
   
  +decode_msg_with_negative_enum_value_test() ->
  +    #m1{a = v2} =
  +        decode_msg(<<8, 254,255,255,255,15>>,
  +                   m1,
  +                   [{{msg,m1}, [#field{name=a, fnum=1, rnum=#m1.a,
  +                                       type={enum,e},
  +                                       occurrence=required, opts=[]}]},
  +                    {{enum,e}, [{v1, 100},
  +                                {v2, -2}]}]).
  +
   decode_msg_with_bool_field_test() ->
       #m1{a = true} =
           decode_msg(<<8,1>>,
  
positive.code:             {N, Rest} = decode_varint(Bin),
              {N =/= 0, Rest};
          {enum, _EnumName}=Key ->
              {N, Rest} = decode_varint(Bin),
              {Key, EnumValues} = lists:keyfind(Key, 1, MsgDefs),
              {value, {EnumName, N}} = lists:keysearch(N, 2, EnumValues),
              {EnumName, Rest};
  
negative.code:             {NV, T} = decode_varint(Bin),
              {decode_zigzag(NV), T};
          int32 ->
              {NV, T} = decode_varint(Bin),
              <<N:32/signed>> = <<NV:32>>,
              {N, T};
          int64 ->
              {NV, T} = decode_varint(Bin),
              <<N:64/signed>> = <<NV:64>>,
  