anchor.diff:          _result[lineEnd - _charOffset - 1] == CR) {
         terminationSequenceLength = 2;
       }
  -    var lineLength = lineEnd - _charOffset - terminationSequenceLength + 1;
  -    String result = new String.fromCharCodes(_result.getRange(0, lineLength));
  +    var lineLength =
  +        lineEnd - _charOffset - _resultOffset - terminationSequenceLength + 1;
  +    String result =
  +        new String.fromCharCodes(_result.getRange(_resultOffset, lineLength));
       _lineBreaks--;
  -    int removeCount = lineLength + terminationSequenceLength;
  -    _result = _result.getRange(removeCount, _result.length - removeCount);
  -    _charOffset = lineEnd + 1;
  +    _resultOffset += (lineLength + terminationSequenceLength);
  +    if (_result.length == _resultOffset) _resetResult();
       return result;
     }
   
  
positive.code: class _StringDecoderBase implements _StringDecoder {
    _StringDecoderBase()
        : _bufferList = new _BufferList(),
        _result = new List<int>(),
        _lineBreakEnds = new Queue<int>();
  
    int write(List<int> buffer) {
      _bufferList.add(buffer);
  
negative.code:   }
  
    void _recordLineBreakEnd(int charPos) {
      _lineBreakEnds.add(charPos);
      _lineBreaks++;
    }
  
    void _resetResult() {
      _charOffset += _result.length;
      _result = new List<int>();
      _resultOffset = 0;
    }
  
    abstract bool _processNext();
  
    _BufferList _bufferList;
    int _resultOffset = 0;
    List<int> _result;
    int _lineBreaks = 0;  // Number of line breaks in the current list.
    // The positions of the line breaks are tracked in terms of absolute
  