anchor.diff:    Result := False; // No higher, equal
   end;
   
  +class function TBaseType.BinStrComp(const Str1, Str2: AnsiString): Integer;
  +var Str1Len, Str2Len, i : Integer;
  +begin
  +   Str1Len := Length(Str1);
  +   Str2Len := Length(Str2);
  +   if (Str1Len < Str2Len) then
  +     Result := -1
  +   else if (Str1Len > Str2Len) then
  +     Result := 1
  +   else begin
  +     Result := 0;
  +     for i:= 1 to Str1Len do begin
  +       if Str1[i] < Str2[i] then begin
  +         Result := -1;
  +         break;
  +       end else if Str1[i] > Str2[i] then begin
  +         Result := 1;
  +         break;
  +       end
  +     end;
  +   end;
  +End;
  +
   class function TBaseType.Compare(const leftBytes, rightBytes: T32Bytes): Integer;
   var i : Integer;
   begin
  
positive.code: interface
  
  uses
    Classes, SysUtils;
  
  Type
    // Raw data in a maximum 65k bytes
  
negative.code:   end;
  end;
  
  { TPlatform }
  
  class function TPlatform.GetElapsedMilliseconds(const previousTickCount: TTickCount): Int64;
  begin
    Result := (Self.GetTickCount - previousTickCount){$IFDEF CPU64} DIV 1000{$ENDIF};
  end;
  
  class function TPlatform.GetTickCount: TTickCount;
  begin
    Result := {$IFDEF CPU64}GetTickCount64{$ELSE}windows.GetTickCount{$ENDIF};
  end;
  
  { TNotifyEventToMany }
  
  procedure TNotifyEventToMany.Add(newNotifyEvent: TNotifyEvent);
  begin
    if IndexOf(newNotifyEvent)>=0 then exit;
    SetLength(FList,length(FList)+1);
    FList[high(FList)] := newNotifyEvent;
  end;
  
  function TNotifyEventToMany.Count: Integer;
  begin
    Result := Length(FList);
  end;
  
  constructor TNotifyEventToMany.Create;
  begin
    SetLength(FList,0);
  end;
  
  procedure TNotifyEventToMany.Delete(index: Integer);
  Var i : Integer;
  begin
    if (index<0) Or (index>High(FList)) then raise Exception.Create('Invalid index '+Inttostr(index)+' in '+Self.ClassName+'.Delete');
    for i := index+1 to high(FList) do begin
      FList[i-1] := FList[i];
    end;
    SetLength(FList,length(FList)-1);
  end;
  
  function TNotifyEventToMany.IndexOf(search: TNotifyEvent): Integer;
  begin
    for Result := low(FList) to high(FList) do begin
      if (TMethod(FList[Result]).Code = TMethod(search).Code) And
         (TMethod(FList[Result]).Data = TMethod(search).Data) then Exit;
    end;
    Result := -1;
  end;
  
  procedure TNotifyEventToMany.Invoke(sender: TObject);
  Var i,j : Integer;
  begin
    j := -1;
    Try
      for i := low(FList) to high(FList) do begin
        j := i;
        FList[i](sender);
      end;
    Except
      On E:Exception do begin
        E.Message := Format('Error TNotifyManyEventHelper.Invoke %d/%d (%s) %s',[j+1,length(FList),E.ClassType,E.Message]);
        Raise;
      end;
    End;
  end;
  
  procedure TNotifyEventToMany.Remove(removeNotifyEvent: TNotifyEvent);
  Var i : Integer;
  begin
    i := IndexOf(removeNotifyEvent);
    if (i>=0) then begin
      Delete(i);
    end;
  end;
  
  end.
  
  