anchor.diff:    LOriginalEncoding := CurrentEncoding;
     FLastLineBreak := '';
     Result := '';
  -  if FBufferedData = nil then
  +  if GetBufferedData = nil then
       Exit;
     NewLineIndex := 0;
     PostNewLineIndex := 0;
   
     while True do
     begin
  -    if (NewLineIndex + 2 > FBufferedData.Length) and (not FNoDataInStream) then
  -      FillBuffer(LOriginalEncoding);
  -
  -    if NewLineIndex >= FBufferedData.Length then
  -    begin
  -      if FNoDataInStream then
  +    if (NewLineIndex + 2 > GetBufferedData.Length) and (not GetNoDataInStream) then
  +      DoFillBuffer(LOriginalEncoding);
  +
  +    if NewLineIndex >= GetBufferedData.Length then
  +    begin
  +      if GetNoDataInStream then
         begin
           PostNewLineIndex := NewLineIndex;
           Break;
         end
         else
         begin
  -        FillBuffer(LOriginalEncoding);
  -        if FBufferedData.Length = 0 then
  +        DoFillBuffer(LOriginalEncoding);
  +        if GetBufferedData.Length = 0 then
             Break;
         end;
       end;
  -    LChar := FBufferedData[NewLineIndex];
  +    LChar := GetBufferedData[NewLineIndex];
       if LChar = #10 then
       begin
         PostNewLineIndex := NewLineIndex + 1;
  
positive.code:       Break;
      end
      else
      if (LChar = #13) and (NewLineIndex + 1 < FBufferedData.Length) and (FBufferedData[NewLineIndex + 1] = #10) then
      begin
        PostNewLineIndex := NewLineIndex + 2;
        FLastLineBreak := #13 + #10;
  
negative.code:     Inc(NewLineIndex);
    end;
  
    Result := GetBufferedData.ToString;
    SetLength(Result, NewLineIndex);
    GetBufferedData.Remove(0, PostNewLineIndex);
  end;
  
  { TStreamReaderHelper }
  
  procedure TStreamReaderHelper.DoFillBuffer(var Encoding: TEncoding);
  begin
    with Self do
      FillBuffer(Encoding);
  end;
  
  function TStreamReaderHelper.GetBufferedData: TStringBuilder;
  begin
    with Self do
      Result := FBufferedData;
  end;
  
  function TStreamReaderHelper.GetNoDataInStream: Boolean;
  begin
    with Self do
      Result := FNoDataInStream;
  end;
  
  end.
  