anchor.diff:      Bin = iolist_to_binary(Data),
       <<Type:8, (byte_size(Bin) + 4):?int32, Bin/binary>>.
   
  -decode_messages(Acc, <<Type:8, Len:?int32, Rest/binary>> = Bin, State) ->
  +decode_message(<<Type:8, Len:?int32, Rest/binary>> = Bin, State) ->
       Len2 = Len - 4,
       case Rest of
           <<Data:Len2/binary, Tail/binary>> ->
  -            decode([{Type, Data} | Acc], Tail, State);
  +            {{Type, Data}, State{tail = Tail}};
           _Other ->
  -            {lists:reverse(Acc), State#state{tail = Bin}}
  -    end;
  -
  -decode_messages(Acc, Bin, State) ->
  -    {lists:reverse(Acc), State#state{tail = Bin}}.
  +            State#state{tail = Bin}
  +    end.
   
   %% decode a single null-terminated string
   %% TODO signature changed, returns [Str, Rest], old code expects {Str, Rest}
  
positive.code: -module(pgsql_wire).
  
  -export([init/1,
           decode_messages/2,
           decode_error/1,
           decode_strings/1,
           encode/2,
  
negative.code: init(Options) ->
      #state{options = Options}.
  
  decode(Bin, #state{tail = Tail} = State) ->
      decode_message(<<Bin/binary, Tail/binary>>, State).
  
  encode(Data, State = #state{}) ->
      Bin = iolist_to_binary(Data),
  