anchor.diff:  			more(Rest, fun (NewBin) -> parse_boundary_eol(NewBin, Pattern) end)
   	end.
   
  --spec parse_boundary_crlf(binary(), pattern()) -> more(part_result()).
  +-spec parse_boundary_crlf(binary(), patterns()) -> more(part_result()).
   parse_boundary_crlf(<<"\r\n", Rest/binary>>, Pattern) ->
   	% The binary is at least 2 bytes long as this function is only called by
   	% parse_boundary_eol/3 when CRLF has been found so a more tuple will never
  
positive.code: 			more(Bin, fun (NewBin) -> parse_headers(NewBin, Pattern, Acc) end)
  	end.
  
  -spec parse_body(binary(), pattern()) -> more(body_result()).
  parse_body(Bin, Pattern = {P, PSize}) when byte_size(Bin) >= PSize ->
  	case binary:match(Bin, P) of
  		{0, _Length} ->
  			<<_:PSize/binary, Rest/binary>> = Bin,
  
negative.code: 	more(Bin, fun (NewBin) -> parse(NewBin, Boundary) end).
  
  -type pattern() :: {binary:cp(), non_neg_integer()}.
  -type patterns() :: {pattern(), pattern()}.
  
  %% @doc Return two compiled binary patterns with their sizes in bytes.
  %% The boundary pattern is the boundary prepended with "\r\n--".
  %% The boundary suffix pattern matches all prefixes of the boundary.
  -spec pattern(binary()) -> patterns().
  pattern(Boundary) ->
  	MatchPattern = <<"\r\n--", Boundary/binary>>,
  	MatchPrefixes = prefixes(MatchPattern),
  	{{binary:compile_pattern(MatchPattern), byte_size(MatchPattern)},
  	 {binary:compile_pattern(MatchPrefixes), byte_size(MatchPattern)}}.
  
  %% @doc Return all prefixes of a binary string.
  %% The list of prefixes includes the full string.
  -spec prefixes(binary()) -> [binary()].
  prefixes(<<C, Rest/binary>>) ->
  	prefixes(Rest, <<C>>).
  
  -spec prefixes(binary(), binary()) -> [binary()].
  prefixes(<<C, Rest/binary>>, Acc) ->
  	[Acc|prefixes(Rest, <<Acc/binary, C>>)];
  prefixes(<<>>, Acc) ->
  	[Acc].
  
  %% @doc Test if a boundary is a possble suffix.
  %% The patterns are expected to have been returned from `pattern/1`.
  -spec suffix_match(binary(), patterns()) -> nomatch | {integer(), integer()}.
  suffix_match(Bin, {_Boundary, {Pat, Len}}) ->
  	Size = byte_size(Bin),
  	suffix_match(Bin, Pat, Size, max(-Size, -Len)).
  
  -spec suffix_match(binary(), tuple(), non_neg_integer(), 0|neg_integer()) ->
  		nomatch | {integer(), integer()}.
  suffix_match(_Bin, _Pat, _Size, _Match=0) ->
  	nomatch;
  suffix_match(Bin, Pat, Size, Match) when Match < 0 ->
  	case binary:match(Bin, Pat, [{scope, {Size, Match}}]) of
  		{Pos, Len}=Part when Pos + Len =:= Size -> Part;
  		{_, Len} -> suffix_match(Bin, Pat, Size, Match + Len);
  		nomatch -> nomatch
  	end.
  
  %% @doc Parse remaining characters of a line beginning with the boundary.
  %% If followed by "--", <em>eof</em> is returned and parsing is finished.
  -spec parse_boundary_tail(binary(), patterns()) -> more(part_result()).
  parse_boundary_tail(Bin, Pattern) when byte_size(Bin) >= 2 ->
  	case Bin of
  		<<"--", _Rest/binary>> ->
  