anchor.diff:               Rest2Var}
       end.
   
  +mk_unpack_bytes(I, FValueVar, RestVar, Rest2Var, Opts) ->
  +    CompilerHasBinary = (catch binary:copy(<<1>>)) == <<1>>,
  +    Copy = case proplists:get_value(copy_bytes, Opts, auto) of
  +               auto when not CompilerHasBinary -> false;
  +               auto when CompilerHasBinary     -> true;
  +               true                            -> true;
  +               false                           -> false;
  +               N when is_integer(N)            -> N;
  +               N when is_float(N)              -> N
  +           end,
  +    if Copy == false ->
  +            indent(I, f("<<~s:Len/binary, ~s/binary>> = ~s,~n",
  +                        [FValueVar, Rest2Var, RestVar]));
  +       Copy == true ->
  +            [indent(I, f("<<Bytes:Len/binary, ~s/binary>> = ~s,~n",
  +                         [Rest2Var, RestVar])),
  +             indent(I, f("~s = binary:copy(Bytes),~n", [FValueVar]))];
  +       is_integer(Copy); is_float(Copy) ->
  +            I2 = I + length(FValueVar) + length(" = "),
  +            [indent(I, f("<<Bytes:Len/binary, ~s/binary>> = ~s,~n",
  +                         [Rest2Var, RestVar])),
  +             indent(I, f("~s = case binary:referenced_byte_size(Bytes) of~n",
  +                            [FValueVar])),
  +             indent(I2+4, f("LB when LB >= byte_size(Bytes) * ~w ->~n", [Copy])),
  +             indent(I2+4+4, f("binary:copy(Bytes);~n")),
  +             indent(I2+4, f("_ ->~n")),
  +             indent(I2+4+4, f("Bytes~n")),
  +             indent(I2, f("end,~n"))]
  +    end.
  +
   fmt_uint_to_int(SrcStr, ResultVar, NumBits) ->
       f("<<~s:~w/signed-native>> = <<(~s):~p/unsigned-native>>",
         [ResultVar, NumBits, SrcStr, NumBits]).
  
positive.code: %%            Opt  = {i,directory()} |
  %%                   {type_specs, boolean()} |
  %%                   {o,directory()} |
  %%                   binary
  %%            Mod  = atom()
  %%            Code = binary()
  %%
  
negative.code:      f("    ~p(Rest, 0, 0, NewMsg).~n",
         [mk_fn(d_read_field_def_, MsgName)])].
  
  format_packed_field_seq_decoder(MsgName, #field{type=Type}=FieldDef, Opts) ->
      case Type of
          fixed32  -> format_dpacked_nonvi(MsgName, FieldDef, 32, 'little');
          sfixed32 -> format_dpacked_nonvi(MsgName, FieldDef, 32, 'little-signed');
  