anchor.diff:  var
     RunLength: Integer;
     EOLCount: Integer;
  -  ChangingElems: array [Boolean] of array of Integer;  //coordinates of these pixels on prev. row
  -  curChangingElem: Integer; //even (0,2,...) means changing from white to black,
  -                            //odd (1,3,...) are black to white
  -  prevChangingElem: Integer;
  -  BitPos: Integer;
  -
  -  RowUsed: Boolean;
  +
     RowCount: Integer;
     //--------------- local functions -------------------------------------------
   
  
positive.code:           RunLength := FindBlackCode;
          //populating array for 2D compression (if needed)
          if ((FOptions and 1) <> 0) then begin
            inc(BitPos,RunLength);
            if Length(ChangingElems[RowUsed])<=CurChangingElem then
              SetLength(ChangingElems[RowUsed],Length(ChangingElems[RowUsed])*2+1); //asymptotically fast realloc
            ChangingElems[RowUsed,CurChangingElem]:=BitPos;
            inc(CurChangingElem);
          end;
  
  
          if RunLength >= 0 then
          begin
  
negative.code:           else
              RunLength := FindBlackCode;
            FillRun(RunLength);
            inc(fBitPos, RunLength);
  
            UpdateChangingElem;
  
            if fBitPos = FWidth then
              Break;
  
            FIsWhite := not FIsWhite;
  