Hi! There's possible optimization. Since all MIME boundaries start with "--" (=$2D2D), we could check whether FCurrentData points to two dashes instead of copying whole data line, switching to lowercase and then comparing:
procedure TMimeDecode.ProcessWaitBoundary; { ##ERIC } var t : Integer; s : String; begin if (FCurrentData <> nil) and (FCurrentData^ <> #0) and {$IFDEF DELPHI2_UP} (PWord(FCurrentData)^=$2D2D) {$ELSE} ((FCurrentData[1]=#$2D)and(FCurrentData[2]=#$2D)) {$ENDIF} then begin [..] procedure TMimeDecode.ProcessPartLine; { ##ERIC } var t : Integer; s : String; { ##ERIC } begin { Check if end of part (boundary line found) } if (FCurrentData <> nil) and (FCurrentData^ <> #0) and {$IFDEF DELPHI2_UP} (PWord(FCurrentData)^=$2D2D) {$ELSE} ((FCurrentData[1]=#$2D)and(FCurrentData[2]=#$2D)) {$ENDIF} then begin This optimization would make great difference when dealing with large multipart MIME messages - parsing time of 9,1MB message (large Base64 attachment) was reduced by this optimization to ~20 seconds (from ~30) - on my old Pentium 120 machine. -- Piotr "Hellrayzer" Dalek Author of ICS-Based Hellcore Mailer - an Outlook Express killer http://www.hcm.prv.pl [EMAIL PROTECTED] ---------------------------------------------------------------------- Najlepszy serwis MOTO w Polsce! >>> http://link.interia.pl/f18a8 -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be