anchor.diff:              ?dbg("R = ~p -> RBits = ~p~n", [pp(R), pp(Rbits)]),
               << ?neg4, Adj:31, 0:1, Rbits/binary >>
       end;
  -encode_neg_int(I,R) when I < -16#7fFFffFF ->
  +encode_neg_int(I,R,Legacy) when I < -16#7fFFffFF ->
       ?dbg("encode_neg_int(BIG ~p)~n", [I]),
  -    Bytes = encode_big_neg(I),
  +    Bytes = encode_big_neg(I,Legacy),
       ?dbg("Bytes = ~p~n", [Bytes]),
       if R == none ->
               <<?negbig, Bytes/binary, 16#ff:8>>;
  
positive.code:     <<WordsAdj:32, Rest/binary>> = Bin,
      Words = 16#ffffFFFF - WordsAdj,
      ?dbg("Words = ~p~n", [Words]),
      {Ib, Rest1} = decode_binary(Rest),
      ?dbg("Ib = ~p | Rest1 = ~p~n", [Ib, Rest1]),
      ISz = size(Ib) * 8,
      <<I0:ISz>> = Ib,
  
negative.code:                     <<?posbig, Bytes/binary, 1:8, Rbits/binary>>
              end
      end;
  encode_int(I, R,  Legacy) when I < 0 ->
      encode_neg_int(I, R,Legacy).
  
  encode_neg_int(I,R,_Legacy) when I =< 0, I >= -16#7fffffff ->
      ?dbg("encode_neg_int(~p, ~p [sz: ~p])~n", [I,pp(R), try bit_size(R) catch error:_ -> "***" end]),
      Adj = max_value(31) + I,    % keep in mind that I < 0
      ?dbg("Adj = ~p~n", [erlang:integer_to_list(Adj,2)]),
  