├── CompressTest ├── CompressTest.dpr ├── CompressTest.dproj ├── CompressTest.dproj.local ├── CompressTest.identcache ├── CompressTest.res ├── CompressTest.stat ├── Unit1.dfm └── Unit1.pas ├── IsapiTest ├── IsapiTest.dpr ├── IsapiTest.dproj ├── IsapiTest.dproj.local ├── IsapiTest.identcache ├── IsapiTest.res ├── WebModuleUnit.dfm └── WebModuleUnit.pas ├── License.txt ├── PosTest ├── PosTest.dpr ├── PosTest.dproj ├── PosTest.dproj.local ├── PosTest.identcache ├── PosTest.res ├── Unit1.dfm └── Unit1.pas ├── RDPMM64.pas ├── RDPQueue64.pas ├── RDPSimd64.pas ├── RDPWebBroker64.pas ├── RDPZlib64.pas ├── Readme.md ├── RobiMM.gif ├── SeaIISFilter ├── SEA.stat ├── SeaIISFilter.dpr ├── SeaIISFilter.dproj ├── SeaIISFilter.dproj.local ├── SeaIISFilter.identcache └── SeaIISFilter.stat ├── SeaMM.dll ├── SeaMM_static.dll ├── SeaQPar.dll ├── SeaRTL.dll ├── SeaZIP.dll ├── TestQueue ├── TestQ.dpr ├── TestQ.dproj ├── TestQ.dproj.local ├── TestQ.identcache ├── TestQ.res ├── UnitQ.dfm └── UnitQ.pas ├── readme.txt └── third-party-programs.txt /CompressTest/CompressTest.dpr: -------------------------------------------------------------------------------- 1 | program CompressTest; 2 | 3 | uses 4 | RDPMM64, 5 | Vcl.Forms, 6 | Unit1 in 'Unit1.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /CompressTest/CompressTest.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 2019/06/26 13:16:42.000.094,=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit1.pas 5 | 2019/06/26 13:18:05.000.075,C:\Users\rober\OneDrive\Documents\Progetti\IntelMM\CompressTest\Unit1.dfm=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit1.dfm 6 | 2019/06/26 13:18:05.000.075,C:\Users\rober\OneDrive\Documents\Progetti\IntelMM\CompressTest\Unit1.pas=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit1.pas 7 | 2019/06/26 13:18:14.000.501,C:\Users\rober\OneDrive\Documents\Progetti\IntelMM\CompressTest\CompressTest.dproj=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Project1.dproj 8 | 9 | 10 | -------------------------------------------------------------------------------- /CompressTest/CompressTest.identcache: -------------------------------------------------------------------------------- 1 | ]C:\Users\rober\OneDrive\DelphiProjects\Libs\Delphi64RTL-2021.12\CompressTest\CompressTest.dprVC:\Users\rober\OneDrive\DelphiProjects\Libs\Delphi64RTL-2021.12\CompressTest\Unit1.pas -------------------------------------------------------------------------------- /CompressTest/CompressTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/CompressTest/CompressTest.res -------------------------------------------------------------------------------- /CompressTest/CompressTest.stat: -------------------------------------------------------------------------------- 1 | [Stats] 2 | EditorSecs=1 3 | DesignerSecs=5 4 | InspectorSecs=1 5 | CompileSecs=1 6 | OtherSecs=1 7 | StartTime=25/08/2019 12:05:52 8 | RealKeys=0 9 | EffectiveKeys=0 10 | DebugSecs=1 11 | -------------------------------------------------------------------------------- /CompressTest/Unit1.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 287 6 | ClientWidth = 566 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | TextHeight = 13 14 | object Button1: TButton 15 | Left = 16 16 | Top = 16 17 | Width = 75 18 | Height = 25 19 | Caption = 'Zlib' 20 | TabOrder = 0 21 | OnClick = Button1Click 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /CompressTest/Unit1.pas: -------------------------------------------------------------------------------- 1 | unit Unit1; 2 | 3 | // 12 mar 2024 4 | // by default the library is using Z_BEST_SPEED_AC (-2) for text buffers (eg. for http json deflate) 5 | // for other kind of files you should use from (1) Z_BEST_SPEED to (9) Z_BEST_COMPRESSION 6 | // 8 ago 2024 please check github repo for zlib options 7 | 8 | interface 9 | 10 | uses 11 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 12 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; 13 | 14 | type 15 | TForm1 = class(TForm) 16 | Button1: TButton; 17 | procedure Button1Click(Sender: TObject); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | Form1: TForm1; 26 | 27 | implementation 28 | 29 | {$R *.dfm} 30 | 31 | //uses System.Zlib; 32 | uses RDPZlib64; 33 | 34 | procedure TForm1.Button1Click(Sender: TObject); 35 | var 36 | T,T2:TMemoryStream; 37 | A,B:integer; 38 | P1,P2:Pointer; 39 | E1,E2:TBytes; 40 | begin 41 | T:=TMemoryStream.Create; 42 | T.LoadFromFile('C:\Chrome.7z'); 43 | T.Seek(0,0); 44 | GetMem(P1,T.Size); 45 | T.Read(P1^, T.Size); 46 | SetLength(E1,T.Size); 47 | Move(PByte(P1)^,E1[0], T.Size); 48 | SeaZlib.Compress(P1,P2,T.Size,A); 49 | ShowMessage(A.ToString); 50 | 51 | SetLength(E2,0); 52 | SeaZlib.Compress(E1,E2); 53 | ShowMessage(IntToStr(Length(E2))); 54 | 55 | FreeMem(P1); 56 | SeaZlib.Decompress(P2,P1,A,B); 57 | ShowMessage(B.ToString); 58 | 59 | SetLength(E1,0); 60 | SeaZlib.Decompress(E2,E1); 61 | ShowMessage(IntToStr(Length(E1))); 62 | 63 | T2:= TMemoryStream.Create; 64 | T.Seek(0,0); 65 | SeaZlib.CompressStream(T,T2); 66 | T2.SaveToFile('C:\temp\Chrome.saved'); 67 | T.Free; 68 | T2.Free; 69 | 70 | T:=TMemoryStream.Create; 71 | T.LoadFromFile('C:\temp\Chrome.saved'); 72 | T2:= TMemoryStream.Create; 73 | SeaZlib.DecompressStream(T,T2); 74 | T2.SaveToFile('C:\temp\Chrome.orig'); 75 | ShowMessage(IntToStr(T2.Size)); 76 | 77 | T.Free; 78 | T2.Free; 79 | end; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /IsapiTest/IsapiTest.dpr: -------------------------------------------------------------------------------- 1 | library IsapiTest; 2 | 3 | uses 4 | RDPMM64, 5 | Winapi.ActiveX, 6 | System.Win.ComObj, 7 | Web.WebBroker, 8 | Web.Win.ISAPIApp, 9 | // Web.Win.ISAPIThreadPool, comment this line, is useless with actual IIS 10 | WebModuleUnit in 'WebModuleUnit.pas' {WebModuleZlib: TWebModule}; 11 | 12 | {$R *.res} 13 | 14 | exports 15 | GetExtensionVersion, 16 | HttpExtensionProc, 17 | TerminateExtension; 18 | 19 | begin 20 | CoInitFlags := COINIT_MULTITHREADED; 21 | Application.MaxConnections:=200; // raise this number from the default 32 22 | Application.Initialize; 23 | Application.WebModuleClass := WebModuleClass; 24 | Application.Run; 25 | end. 26 | -------------------------------------------------------------------------------- /IsapiTest/IsapiTest.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {1263A5F3-D1D0-4255-969F-12647969104B} 4 | 18.8 5 | None 6 | IsapiTest.dpr 7 | True 8 | Release 9 | Win64 10 | 3 11 | Library 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Cfg_1 40 | true 41 | true 42 | 43 | 44 | true 45 | Base 46 | true 47 | 48 | 49 | .\$(Platform)\$(Config) 50 | .\$(Platform)\$(Config) 51 | false 52 | false 53 | false 54 | false 55 | false 56 | true 57 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 58 | $(BDS)\bin\delphi_PROJECTICON.ico 59 | $(BDS)\bin\delphi_PROJECTICNS.icns 60 | IsapiTest 61 | 62 | 63 | DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;dxFlowChartRS26;vclactnband;dxBarRS26;vclFireDAC;dxPScxExtCommonRS26;emsclientfiredac;dxFireDACEMFRS26;DataSnapFireDAC;svnui;tethering;FireDACADSDriver;rtcSDK;DBXMSSQLDriver;dxRichEditCoreRS26;dxPSdxSpreadSheetLnkRS26;dxRichEditControlRS26;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;dxGaugeControlRS26;vcltouch;dxorgcRS26;dxPScxVGridLnkRS26;vcldb;bindcompfmx;svn;FMXTMSFNCUIPackPkgDXE12;DBXOracleDriver;DPFiOSPackagesDX10;dxOrgChartAdvancedCustomizeFormRS26;inetdb;DPFAndroidPackagesXE7;dxBarDBNavRS26;dxDBXServerModeRS26;dxGDIPlusRS26;emsedge;FireDACIBDriver;fmx;fmxdae;dxServerModeRS26;dxWizardControlRS26;dxCloudServiceLibraryRS26;dxPSdxFCLnkRS26;dxTabbedMDIRS26;dxPSLnksRS26;FireDACDBXDriver;dbexpress;cxGridRS26;dxPDFViewerRS26;dxComnRS26;dxEMFRS26;vclx;dxPsPrVwAdvRS26;dxPScxTLLnkRS26;dsnap;DataSnapCommon;emsclient;FireDACCommon;cxGridEMFRS26;VCLTMSFNCUIPackPkgDXE12;IndySystem260;RESTBackendComponents;DataSnapConnectors;cxSchedulerTreeBrowserRS26;dxADOServerModeRS26;VCLRESTComponents;soapserver;cxVerticalGridRS26;vclie;dxtrmdRS26;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;dxmdsRS26;dxPSdxLCLnkRS26;dxdborRS26;cxSchedulerRS26;FireDACCommonODBC;FireDACCommonDriver;VCLTMSFNCCorePkgDXE12;DataSnapClient;inet;IndyProtocols260;dxFireDACServerModeRS26;bindcompdbx;dxSpellCheckerRS26;dxSpreadSheetCoreConditionalFormattingDialogsRS26;vcl;DBXSybaseASEDriver;dxPSdxDBOCLnkRS26;cxPivotGridRS26;IndyCore260;FireDACDb2Driver;dxSpreadSheetReportDesignerRS26;cxTreeListdxBarPopupMenuRS26;dsnapcon;cxTreeListRS26;dxPScxPCProdRS26;dxPScxPivotGridLnkRS26;FMXTMSFNCCorePkgDXE12;dxPSCoreRS26;dxNavBarRS26;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;dxCoreRS26;dxBarExtItemsRS26;FireDAC;dxSpreadSheetRS26;cxExportRS26;dxPSdxGaugeControlLnkRS26;emshosting;dxPSPrVwRibbonRS26;cxSchedulerRibbonStyleEventEditorRS26;FireDACSqliteDriver;FireDACPgDriver;dxPSRichEditControlLnkRS26;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;dxdbtrRS26;cxPivotGridChartRS26;dxRichEditControlCoreRS26;soaprtl;DbxCommonDriver;dxFlowChartAdvancedCustomizeFormRS26;dxDockingRS26;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;cxLibraryRS26;DBXSybaseASADriver;dxTileControlRS26;CustomIPTransport;vcldsnap;dxSkinsCoreRS26;dxSpreadSheetConditionalFormattingDialogsRS26;dxPScxSchedulerLnkRS26;dxPSdxDBTVLnkRS26;bindcomp;appanalytics;dxPSdxOCLnkRS26;DBXInformixDriver;dxRibbonCustomizationFormRS26;cxSchedulerGridRS26;bindcompvcl;dxFlowChartLayoutsRS26;dxADOEMFRS26;dbxcds;VclSmp;adortl;FireDACODBCDriver;dxRibbonRS26;DataSnapIndy10ServerTransport;dxPScxCommonRS26;dxRichEditDocumentModelRS26;dxBarExtDBItemsRS26;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;dxPSdxPDFViewerLnkRS26;dxPScxGridLnkRS26;dxFlowChartDesignerRS26;dxSpreadSheetCoreRS26;fmxase;$(DCC_UsePackage) 64 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 65 | Debug 66 | true 67 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 68 | 1033 69 | 70 | 71 | DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;dxFlowChartRS26;vclactnband;dxBarRS26;vclFireDAC;dxPScxExtCommonRS26;emsclientfiredac;dxFireDACEMFRS26;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;dxRichEditCoreRS26;dxPSdxSpreadSheetLnkRS26;dxRichEditControlRS26;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;dxGaugeControlRS26;vcltouch;dxorgcRS26;dxPScxVGridLnkRS26;vcldb;bindcompfmx;FMXTMSFNCUIPackPkgDXE12;DBXOracleDriver;dxOrgChartAdvancedCustomizeFormRS26;inetdb;dxBarDBNavRS26;dxDBXServerModeRS26;dxGDIPlusRS26;emsedge;FireDACIBDriver;fmx;fmxdae;dxServerModeRS26;dxWizardControlRS26;dxCloudServiceLibraryRS26;dxPSdxFCLnkRS26;dxTabbedMDIRS26;dxPSLnksRS26;FireDACDBXDriver;dbexpress;cxGridRS26;dxPDFViewerRS26;dxComnRS26;dxEMFRS26;vclx;dxPsPrVwAdvRS26;dxPScxTLLnkRS26;dsnap;DataSnapCommon;emsclient;FireDACCommon;cxGridEMFRS26;VCLTMSFNCUIPackPkgDXE12;IndySystem260;RESTBackendComponents;DataSnapConnectors;cxSchedulerTreeBrowserRS26;dxADOServerModeRS26;VCLRESTComponents;soapserver;cxVerticalGridRS26;vclie;dxtrmdRS26;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;dxmdsRS26;dxPSdxLCLnkRS26;dxdborRS26;cxSchedulerRS26;FireDACCommonODBC;FireDACCommonDriver;VCLTMSFNCCorePkgDXE12;DataSnapClient;inet;IndyProtocols260;dxFireDACServerModeRS26;bindcompdbx;dxSpellCheckerRS26;dxSpreadSheetCoreConditionalFormattingDialogsRS26;vcl;DBXSybaseASEDriver;dxPSdxDBOCLnkRS26;cxPivotGridRS26;IndyCore260;FireDACDb2Driver;dxSpreadSheetReportDesignerRS26;cxTreeListdxBarPopupMenuRS26;dsnapcon;cxTreeListRS26;dxPScxPCProdRS26;dxPScxPivotGridLnkRS26;FMXTMSFNCCorePkgDXE12;dxPSCoreRS26;dxNavBarRS26;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;dxCoreRS26;dxBarExtItemsRS26;FireDAC;dxSpreadSheetRS26;cxExportRS26;dxPSdxGaugeControlLnkRS26;emshosting;dxPSPrVwRibbonRS26;cxSchedulerRibbonStyleEventEditorRS26;FireDACSqliteDriver;FireDACPgDriver;dxPSRichEditControlLnkRS26;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;dxdbtrRS26;cxPivotGridChartRS26;dxRichEditControlCoreRS26;soaprtl;DbxCommonDriver;dxFlowChartAdvancedCustomizeFormRS26;dxDockingRS26;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;cxLibraryRS26;DBXSybaseASADriver;dxTileControlRS26;CustomIPTransport;vcldsnap;dxSkinsCoreRS26;dxSpreadSheetConditionalFormattingDialogsRS26;dxPScxSchedulerLnkRS26;dxPSdxDBTVLnkRS26;bindcomp;appanalytics;dxPSdxOCLnkRS26;DBXInformixDriver;dxRibbonCustomizationFormRS26;cxSchedulerGridRS26;bindcompvcl;dxFlowChartLayoutsRS26;dxADOEMFRS26;dbxcds;VclSmp;adortl;FireDACODBCDriver;dxRibbonRS26;DataSnapIndy10ServerTransport;dxPScxCommonRS26;dxRichEditDocumentModelRS26;dxBarExtDBItemsRS26;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;dxPSdxPDFViewerLnkRS26;dxPScxGridLnkRS26;dxFlowChartDesignerRS26;dxSpreadSheetCoreRS26;fmxase;$(DCC_UsePackage) 72 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 73 | Debug 74 | true 75 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 76 | 1033 77 | 78 | 79 | DEBUG;$(DCC_Define) 80 | true 81 | false 82 | true 83 | true 84 | true 85 | 86 | 87 | false 88 | 89 | 90 | c:\Libs\IntelMM;$(DCC_UnitSearchPath) 91 | true 92 | 1033 93 | (None) 94 | 95 | 96 | false 97 | RELEASE;$(DCC_Define) 98 | 0 99 | 0 100 | 101 | 102 | 103 | MainSource 104 | 105 | 106 |
WebModuleZlib
107 | TWebModule 108 |
109 | 110 | Cfg_2 111 | Base 112 | 113 | 114 | Base 115 | 116 | 117 | Cfg_1 118 | Base 119 | 120 |
121 | 122 | Delphi.Personality.12 123 | Library 124 | 125 | 126 | 127 | IsapiTest.dpr 128 | 129 | 130 | IP Abstraction Indy Implementation Design Time 131 | SGC WebSockets 132 | TMS FNC UI Pack for FMX/VCL Designtime 133 | Microsoft Office 2000 Sample Automation Server Wrapper Components 134 | Microsoft Office XP Sample Automation Server Wrapper Components 135 | ExpressCloudService Library by Developer Express Inc. 136 | ExpressPivotGrid OLAP by Developer Express Inc. 137 | ExpressScheduler Web Service Storage by Developer Express Inc. 138 | 139 | 140 | 141 | 142 | 143 | true 144 | 145 | 146 | 147 | 148 | true 149 | 150 | 151 | 152 | 153 | true 154 | 155 | 156 | 157 | 158 | IsapiTest.dll 159 | true 160 | 161 | 162 | 163 | 164 | 1 165 | 166 | 167 | 0 168 | 169 | 170 | 171 | 172 | classes 173 | 1 174 | 175 | 176 | classes 177 | 1 178 | 179 | 180 | 181 | 182 | res\xml 183 | 1 184 | 185 | 186 | res\xml 187 | 1 188 | 189 | 190 | 191 | 192 | library\lib\armeabi-v7a 193 | 1 194 | 195 | 196 | 197 | 198 | library\lib\armeabi 199 | 1 200 | 201 | 202 | library\lib\armeabi 203 | 1 204 | 205 | 206 | 207 | 208 | library\lib\armeabi-v7a 209 | 1 210 | 211 | 212 | 213 | 214 | library\lib\mips 215 | 1 216 | 217 | 218 | library\lib\mips 219 | 1 220 | 221 | 222 | 223 | 224 | library\lib\armeabi-v7a 225 | 1 226 | 227 | 228 | library\lib\arm64-v8a 229 | 1 230 | 231 | 232 | 233 | 234 | library\lib\armeabi-v7a 235 | 1 236 | 237 | 238 | 239 | 240 | res\drawable 241 | 1 242 | 243 | 244 | res\drawable 245 | 1 246 | 247 | 248 | 249 | 250 | res\values 251 | 1 252 | 253 | 254 | res\values 255 | 1 256 | 257 | 258 | 259 | 260 | res\values-v21 261 | 1 262 | 263 | 264 | res\values-v21 265 | 1 266 | 267 | 268 | 269 | 270 | res\values 271 | 1 272 | 273 | 274 | res\values 275 | 1 276 | 277 | 278 | 279 | 280 | res\drawable 281 | 1 282 | 283 | 284 | res\drawable 285 | 1 286 | 287 | 288 | 289 | 290 | res\drawable-xxhdpi 291 | 1 292 | 293 | 294 | res\drawable-xxhdpi 295 | 1 296 | 297 | 298 | 299 | 300 | res\drawable-ldpi 301 | 1 302 | 303 | 304 | res\drawable-ldpi 305 | 1 306 | 307 | 308 | 309 | 310 | res\drawable-mdpi 311 | 1 312 | 313 | 314 | res\drawable-mdpi 315 | 1 316 | 317 | 318 | 319 | 320 | res\drawable-hdpi 321 | 1 322 | 323 | 324 | res\drawable-hdpi 325 | 1 326 | 327 | 328 | 329 | 330 | res\drawable-xhdpi 331 | 1 332 | 333 | 334 | res\drawable-xhdpi 335 | 1 336 | 337 | 338 | 339 | 340 | res\drawable-mdpi 341 | 1 342 | 343 | 344 | res\drawable-mdpi 345 | 1 346 | 347 | 348 | 349 | 350 | res\drawable-hdpi 351 | 1 352 | 353 | 354 | res\drawable-hdpi 355 | 1 356 | 357 | 358 | 359 | 360 | res\drawable-xhdpi 361 | 1 362 | 363 | 364 | res\drawable-xhdpi 365 | 1 366 | 367 | 368 | 369 | 370 | res\drawable-xxhdpi 371 | 1 372 | 373 | 374 | res\drawable-xxhdpi 375 | 1 376 | 377 | 378 | 379 | 380 | res\drawable-xxxhdpi 381 | 1 382 | 383 | 384 | res\drawable-xxxhdpi 385 | 1 386 | 387 | 388 | 389 | 390 | res\drawable-small 391 | 1 392 | 393 | 394 | res\drawable-small 395 | 1 396 | 397 | 398 | 399 | 400 | res\drawable-normal 401 | 1 402 | 403 | 404 | res\drawable-normal 405 | 1 406 | 407 | 408 | 409 | 410 | res\drawable-large 411 | 1 412 | 413 | 414 | res\drawable-large 415 | 1 416 | 417 | 418 | 419 | 420 | res\drawable-xlarge 421 | 1 422 | 423 | 424 | res\drawable-xlarge 425 | 1 426 | 427 | 428 | 429 | 430 | res\values 431 | 1 432 | 433 | 434 | res\values 435 | 1 436 | 437 | 438 | 439 | 440 | 1 441 | 442 | 443 | 1 444 | 445 | 446 | 0 447 | 448 | 449 | 450 | 451 | 1 452 | .framework 453 | 454 | 455 | 1 456 | .framework 457 | 458 | 459 | 0 460 | 461 | 462 | 463 | 464 | 1 465 | .dylib 466 | 467 | 468 | 1 469 | .dylib 470 | 471 | 472 | 0 473 | .dll;.bpl 474 | 475 | 476 | 477 | 478 | 1 479 | .dylib 480 | 481 | 482 | 1 483 | .dylib 484 | 485 | 486 | 1 487 | .dylib 488 | 489 | 490 | 1 491 | .dylib 492 | 493 | 494 | 1 495 | .dylib 496 | 497 | 498 | 0 499 | .bpl 500 | 501 | 502 | 503 | 504 | 0 505 | 506 | 507 | 0 508 | 509 | 510 | 0 511 | 512 | 513 | 0 514 | 515 | 516 | 0 517 | 518 | 519 | 0 520 | 521 | 522 | 0 523 | 524 | 525 | 0 526 | 527 | 528 | 529 | 530 | 1 531 | 532 | 533 | 1 534 | 535 | 536 | 1 537 | 538 | 539 | 540 | 541 | 1 542 | 543 | 544 | 1 545 | 546 | 547 | 1 548 | 549 | 550 | 551 | 552 | 1 553 | 554 | 555 | 1 556 | 557 | 558 | 1 559 | 560 | 561 | 562 | 563 | 1 564 | 565 | 566 | 1 567 | 568 | 569 | 1 570 | 571 | 572 | 573 | 574 | 1 575 | 576 | 577 | 1 578 | 579 | 580 | 1 581 | 582 | 583 | 584 | 585 | 1 586 | 587 | 588 | 1 589 | 590 | 591 | 1 592 | 593 | 594 | 595 | 596 | 1 597 | 598 | 599 | 1 600 | 601 | 602 | 1 603 | 604 | 605 | 606 | 607 | 1 608 | 609 | 610 | 1 611 | 612 | 613 | 1 614 | 615 | 616 | 617 | 618 | 1 619 | 620 | 621 | 1 622 | 623 | 624 | 1 625 | 626 | 627 | 628 | 629 | 1 630 | 631 | 632 | 1 633 | 634 | 635 | 1 636 | 637 | 638 | 639 | 640 | 1 641 | 642 | 643 | 1 644 | 645 | 646 | 1 647 | 648 | 649 | 650 | 651 | 1 652 | 653 | 654 | 1 655 | 656 | 657 | 1 658 | 659 | 660 | 661 | 662 | 1 663 | 664 | 665 | 1 666 | 667 | 668 | 1 669 | 670 | 671 | 672 | 673 | 1 674 | 675 | 676 | 1 677 | 678 | 679 | 1 680 | 681 | 682 | 683 | 684 | 1 685 | 686 | 687 | 1 688 | 689 | 690 | 1 691 | 692 | 693 | 694 | 695 | 1 696 | 697 | 698 | 1 699 | 700 | 701 | 1 702 | 703 | 704 | 705 | 706 | 1 707 | 708 | 709 | 1 710 | 711 | 712 | 1 713 | 714 | 715 | 716 | 717 | 1 718 | 719 | 720 | 1 721 | 722 | 723 | 1 724 | 725 | 726 | 727 | 728 | 1 729 | 730 | 731 | 1 732 | 733 | 734 | 1 735 | 736 | 737 | 738 | 739 | 1 740 | 741 | 742 | 1 743 | 744 | 745 | 1 746 | 747 | 748 | 749 | 750 | 1 751 | 752 | 753 | 1 754 | 755 | 756 | 1 757 | 758 | 759 | 760 | 761 | 1 762 | 763 | 764 | 1 765 | 766 | 767 | 1 768 | 769 | 770 | 771 | 772 | 1 773 | 774 | 775 | 1 776 | 777 | 778 | 1 779 | 780 | 781 | 782 | 783 | 1 784 | 785 | 786 | 1 787 | 788 | 789 | 1 790 | 791 | 792 | 793 | 794 | 1 795 | 796 | 797 | 1 798 | 799 | 800 | 801 | 802 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 803 | 1 804 | 805 | 806 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 807 | 1 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 1 816 | 817 | 818 | 1 819 | 820 | 821 | 1 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | Contents\Resources 830 | 1 831 | 832 | 833 | Contents\Resources 834 | 1 835 | 836 | 837 | 838 | 839 | library\lib\armeabi-v7a 840 | 1 841 | 842 | 843 | library\lib\arm64-v8a 844 | 1 845 | 846 | 847 | 1 848 | 849 | 850 | 1 851 | 852 | 853 | 1 854 | 855 | 856 | 1 857 | 858 | 859 | 1 860 | 861 | 862 | 1 863 | 864 | 865 | 0 866 | 867 | 868 | 869 | 870 | library\lib\armeabi-v7a 871 | 1 872 | 873 | 874 | 875 | 876 | 1 877 | 878 | 879 | 1 880 | 881 | 882 | 883 | 884 | Assets 885 | 1 886 | 887 | 888 | Assets 889 | 1 890 | 891 | 892 | 893 | 894 | Assets 895 | 1 896 | 897 | 898 | Assets 899 | 1 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | True 915 | True 916 | 917 | 918 | 12 919 | 920 | 921 | 922 | 923 |
924 | -------------------------------------------------------------------------------- /IsapiTest/IsapiTest.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 2020/03/02 18:21:35.000.221,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Unit1.pas 5 | 2020/03/06 15:22:30.000.638,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\FormUnit2.pas 6 | 2020/03/06 15:22:30.000.794,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\WebModuleUnit3.pas 7 | 2020/03/09 21:51:40.000.937,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\WebModuleUnit3.pas 8 | 2020/03/09 21:52:12.000.443,C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\WebModuleUnit3.pas=C:\Libs\IntelMM\IsapiTest\WebModuleUnit.pas 9 | 2020/03/09 21:52:12.000.443,C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\WebModuleUnit3.dfm=C:\Libs\IntelMM\IsapiTest\WebModuleUnit.dfm 10 | 2020/03/09 21:52:16.000.378,C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Project3.dproj=C:\Libs\IntelMM\IsapiTest\IsapiTest.dproj 11 | 12 | 13 | -------------------------------------------------------------------------------- /IsapiTest/IsapiTest.identcache: -------------------------------------------------------------------------------- 1 | +C:\Libs\IntelMM\IsapiTest\WebModuleUnit.pas'C:\Libs\IntelMM\IsapiTest\IsapiTest.dpr -------------------------------------------------------------------------------- /IsapiTest/IsapiTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/IsapiTest/IsapiTest.res -------------------------------------------------------------------------------- /IsapiTest/WebModuleUnit.dfm: -------------------------------------------------------------------------------- 1 | object WebModuleZlib: TWebModuleZlib 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | end> 9 | AfterDispatch = WebModuleAfterDispatch 10 | Height = 230 11 | Width = 415 12 | end 13 | -------------------------------------------------------------------------------- /IsapiTest/WebModuleUnit.pas: -------------------------------------------------------------------------------- 1 | unit WebModuleUnit; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Classes, Web.HTTPApp; 7 | 8 | type 9 | TWebModuleZlib = class(TWebModule) 10 | procedure WebModuleAfterDispatch(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 11 | private 12 | { Private declarations } 13 | public 14 | { Public declarations } 15 | end; 16 | 17 | var 18 | WebModuleClass: TComponentClass = TWebModuleZlib; 19 | 20 | implementation 21 | 22 | uses RDPWebBroker64; 23 | 24 | {%CLASSGROUP 'System.Classes.TPersistent'} 25 | {$R *.dfm} 26 | 27 | procedure TWebModuleZlib.WebModuleAfterDispatch(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 28 | begin 29 | Response.ZlibDeflate; 30 | end; 31 | 32 | end. 33 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | Please check the products license, now (August 2024) completely free to deploy and distribute 2 | https://www.intel.com/content/www/us/en/developer/tools/oneapi/ipp.html 3 | https://www.intel.com/content/www/us/en/developer/tools/oneapi/onetbb.html 4 | 5 | Copyright (c) 2024 Roberto Della Pasqua 6 | Use and Redistribution. You may use and redistribute the software (the “Software”) libraries, without modification, provided the following conditions are met: 7 | * No redistributions of source code permitted without author permission. 8 | * No reverse engineering, decompilation, or disassembly of this Software is permitted. 9 | * Freely donateware (contact me roberto.dellapasqua@live.com or www.dellapasqua.com). 10 | 11 | DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT ROBERTO DELLA PASQUA WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. 12 | 13 | LIMITATION OF LIABILITY. IN NO EVENT WILL ROBERTO DELLA PASQUA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD ROBERTO DELLA PASQUA HARMLESS AGAINST ANY CLAIMS AND EXPENSES RESULTING FROM YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. 14 | 15 | Copyright (c) 2022 Intel Corporation. 16 | Use and Redistribution. You may use and redistribute the software (the “Software”), without modification, provided the following conditions are met: 17 | * Redistributions must reproduce the above copyright notice and the following terms of use in the Software and in the documentation and/or other materials provided with the distribution. 18 | * Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products derived from this Software without specific prior written permission. 19 | * No reverse engineering, decompilation, or disassembly of this Software is permitted. 20 | 21 | Limited patent license. Intel grants you a world-wide, royalty-free, non-exclusive license under patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell (“Utilize”) this Software, but solely to the extent that any such patent is necessary to Utilize the Software alone. The patent license shall not apply to any combinations which include this software. No hardware per se is licensed hereunder. 22 | 23 | Third party and other Intel programs. “Third Party Programs” are the files listed in the “third-party-programs.txt” text file that is included with the Software and may include Intel programs under separate license terms. Third Party Programs, even if included with the distribution of the Materials, are governed by separate license terms and those license terms solely govern your use of those programs. 24 | 25 | DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. 26 | 27 | LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD INTEL HARMLESS AGAINST ANY CLAIMS AND EXPENSES RESULTING FROM YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. 28 | 29 | No support. Intel may make changes to the Software, at any time without notice, and is not obligated to support, update or provide training for the Software. 30 | 31 | Termination. Intel may terminate your right to use the Software in the event of your breach of this Agreement and you fail to cure the breach within a reasonable period of time. 32 | 33 | Feedback. Should you provide Intel with comments, modifications, corrections, enhancements or other input (“Feedback”) related to the Software Intel will be free to use, disclose, reproduce, license or otherwise distribute or exploit the Feedback in its sole discretion without any obligations or restrictions of any kind, including without limitation, intellectual property rights or licensing obligations. 34 | 35 | Compliance with laws. You agree to comply with all relevant laws and regulations governing your use, transfer, import or export (or prohibition thereof) of the Software. 36 | 37 | Governing law. All disputes will be governed by the laws of the United States of America and the State of Delaware without reference to conflict of law principles and subject to the exclusive jurisdiction of the state or federal courts sitting in the State of Delaware, and each party agrees that it submits to the personal jurisdiction and venue of those courts and waives any objections. The United Nations Convention on Contracts for the International Sale of Goods (1980) is specifically excluded and will not apply to the Software. 38 | 39 | *Other names and brands may be claimed as the property of others. 40 | -------------------------------------------------------------------------------- /PosTest/PosTest.dpr: -------------------------------------------------------------------------------- 1 | program PosTest; 2 | 3 | uses 4 | RDPMM64, 5 | Vcl.Forms, 6 | Unit1 in 'Unit1.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /PosTest/PosTest.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 2020/03/02 18:21:35.000.221,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Unit1.pas 5 | 2020/03/06 15:22:30.000.794,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\WebModuleUnit3.pas 6 | 2020/03/06 15:22:30.000.638,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\FormUnit2.pas 7 | 2020/03/09 19:30:17.000.632,=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Unit1.pas 8 | 2020/03/09 19:30:55.000.997,C:\Libs\IntelMM\PosTest\Unit1.dfm=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Unit1.dfm 9 | 2020/03/09 19:30:55.000.997,C:\Libs\IntelMM\PosTest\Unit1.pas=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Unit1.pas 10 | 2020/03/09 19:30:59.000.951,C:\Libs\IntelMM\PosTest\PosTest.dproj=C:\Users\Administrator\Documents\Embarcadero\Studio\Projects\Project3.dproj 11 | 12 | 13 | -------------------------------------------------------------------------------- /PosTest/PosTest.identcache: -------------------------------------------------------------------------------- 1 | SC:\Users\rober\OneDrive\DelphiProjects\Libs\Delphi64RTL-2021.12\PosTest\PosTest.dprQC:\Users\rober\OneDrive\DelphiProjects\Libs\Delphi64RTL-2021.12\PosTest\Unit1.pas -------------------------------------------------------------------------------- /PosTest/PosTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/PosTest/PosTest.res -------------------------------------------------------------------------------- /PosTest/Unit1.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 299 6 | ClientWidth = 641 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 13 16 | object Memo1: TMemo 17 | Left = 24 18 | Top = 32 19 | Width = 305 20 | Height = 161 21 | Lines.Strings = ( 22 | 'Memo1') 23 | TabOrder = 0 24 | end 25 | object Button1: TButton 26 | Left = 32 27 | Top = 208 28 | Width = 75 29 | Height = 25 30 | Caption = 'Button1' 31 | TabOrder = 1 32 | OnClick = Button1Click 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /PosTest/Unit1.pas: -------------------------------------------------------------------------------- 1 | unit Unit1; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; 8 | 9 | type 10 | TForm1 = class(TForm) 11 | Memo1: TMemo; 12 | Button1: TButton; 13 | procedure Button1Click(Sender: TObject); 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | end; 19 | 20 | var 21 | Form1: TForm1; 22 | 23 | implementation 24 | 25 | {$R *.dfm} 26 | 27 | var 28 | SA: string = 'abcdefghilmnopqrstuvz'; 29 | SB: string = 'abcd'; 30 | SC: string = 'ghi'; 31 | SD: string = 'uvz'; 32 | 33 | WA: widestring = 'abcdefghilmnopqrstuvz'; 34 | WB: widestring = 'abcd'; 35 | WC: widestring = 'ghi'; 36 | WD: widestring = 'uvz'; 37 | 38 | RA: rawbytestring = 'abcdefghilmnopqrstuvz'; 39 | RB: rawbytestring = 'abcd'; 40 | RC: rawbytestring = 'ghi'; 41 | RD: rawbytestring = 'uvz'; 42 | 43 | procedure TForm1.Button1Click(Sender: TObject); 44 | var 45 | SZ : string; 46 | WZ : widestring; 47 | RZ : rawbytestring; 48 | 49 | begin 50 | Memo1.Lines.Add(IntToStr(Pos(SB, SA))); 51 | Memo1.Lines.Add(IntToStr(Pos(SC, SA))); 52 | Memo1.Lines.Add(IntToStr(Pos(SD, SA))); 53 | SZ:= SA + 'uvz'; 54 | Memo1.Lines.Add(IntToStr(Pos(SD, SZ, 20))); 55 | Memo1.Lines.Add(''); 56 | 57 | Memo1.Lines.Add(IntToStr(Pos(WB, WA))); 58 | Memo1.Lines.Add(IntToStr(Pos(WC, WA))); 59 | Memo1.Lines.Add(IntToStr(Pos(WD, WA))); 60 | WZ:= WA + 'uvz'; 61 | Memo1.Lines.Add(IntToStr(Pos(WD, WZ, 20))); 62 | Memo1.Lines.Add(''); 63 | 64 | Memo1.Lines.Add(IntToStr(Pos(RB, RA))); 65 | Memo1.Lines.Add(IntToStr(Pos(RC, RA))); 66 | Memo1.Lines.Add(IntToStr(Pos(RD, RA))); 67 | RZ:= RA + 'uvz'; 68 | Memo1.Lines.Add(IntToStr(Pos(RD, RZ, 20))); 69 | Memo1.Lines.Add(''); 70 | end; 71 | 72 | end. 73 | -------------------------------------------------------------------------------- /RDPMM64.pas: -------------------------------------------------------------------------------- 1 | unit RDPMM64; 2 | 3 | // 22 Febr 2019 Roberto Della Pasqua www.dellapasqua.com 4 | // memory manager replacement with Intel ipp libraries 5 | // 30 oct 2024 updated to intel one api v2022.0, visual c++ v19.41.34123 6 | // 11 apr 2025 updated to intel one api v2022.1, visual c++ v19.43.34810 7 | // seamm.dll md5 df1e5b489d2f9ac325d194a9dc67c8bc size 107520 8 | 9 | interface 10 | 11 | uses 12 | RDPSimd64; 13 | //please check the bottom file about delphi 12.x version 14 | //please check intel oneapi license for library distribution 15 | 16 | implementation 17 | 18 | const 19 | TBBMalloc = 'SeaMM.DLL'; 20 | 21 | function SeaMalloc(Size: NativeUint): Pointer; cdecl; external TBBMalloc name 'scalable_malloc'; 22 | procedure SeaFreemem(P: Pointer); cdecl; external TBBMalloc name 'scalable_free'; 23 | function SeaRealloc(P: Pointer; Size: NativeUint): Pointer; cdecl; external TBBMalloc name 'scalable_realloc'; 24 | 25 | function QSEAGetMem(Size: Nativeint): Pointer; inline; 26 | begin 27 | Result := SeaMalloc(Size); 28 | end; 29 | 30 | function QSEAFreeMem(P: Pointer): Integer; inline; 31 | begin 32 | SeaFreemem(P); 33 | Result := 0; 34 | end; 35 | 36 | function QSEAReallocMem(P: Pointer; Size: Nativeint): Pointer; inline; 37 | begin 38 | Result := SeaRealloc(P, Size); 39 | end; 40 | 41 | function QSEAAllocMem(Size: Nativeint): Pointer; inline; 42 | begin 43 | Result := SeaMalloc(Size); 44 | if (Result <> nil) then 45 | {$IF CompilerVersion < 36.0} 46 | SeaZero(Result, Size); 47 | {$ELSE} 48 | Fillchar(Result^, Size, #0); 49 | {$IFEND} 50 | end; 51 | 52 | function QRegisterExpectedMemoryLeak(P: Pointer): Boolean; inline; 53 | begin 54 | Result := False; 55 | end; 56 | 57 | function QUnregisterExpectedMemoryLeak(P: Pointer): Boolean; inline; 58 | begin 59 | Result := False; 60 | end; 61 | 62 | const 63 | SEAMemoryManager: TMemoryManagerEx = ( 64 | Getmem: QSEAGetMem; 65 | Freemem: QSEAFreeMem; 66 | Reallocmem: QSEAReallocMem; 67 | Allocmem: QSEAAllocMem; 68 | RegisterExpectedMemoryLeak: QRegisterExpectedMemoryLeak; 69 | UnregisterExpectedMemoryLeak: QRegisterExpectedMemoryLeak 70 | ); 71 | 72 | var 73 | OldMemoryManager: TMemoryManagerEx; 74 | 75 | initialization 76 | GetMemoryManager(OldMemoryManager); 77 | SetMemoryManager(SEAMemoryManager); 78 | 79 | finalization 80 | SetMemoryManager(OldMemoryManager); 81 | 82 | end. 83 | -------------------------------------------------------------------------------- /RDPQueue64.pas: -------------------------------------------------------------------------------- 1 | unit RDPQueue64; 2 | // Roberto Della Pasqua www.dellapasqua.com 3 | // 14 apr 2025 thread safe concurrent queue from Intel One Api v2022.1 4 | 5 | interface 6 | 7 | uses Windows; 8 | 9 | const 10 | QPARDLL = 'SeaQPar.dll'; 11 | 12 | function CreateQueue: pointer; stdcall; external QPARDLL name 'CreateQueue'; 13 | function PopFromQueue(queue: pointer; ptr: pointer): LongBool; stdcall; external QPARDLL name 'PopFromQueue'; 14 | function IsQueueEmpty(queue: pointer): LongBool; stdcall; external QPARDLL name 'IsQueueEmpty'; 15 | procedure PushToQueue(queue: pointer; ptr: pointer); stdcall; external QPARDLL name 'PushToQueue'; 16 | procedure FreeQueue(queue: pointer); stdcall; external QPARDLL name 'FreeQueue'; 17 | 18 | implementation 19 | 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /RDPSimd64.pas: -------------------------------------------------------------------------------- 1 | unit RDPSimd64; 2 | 3 | // 22 febr 2019 Roberto Della Pasqua www.dellapasqua.com 4 | // rtl api patches with Intel IPP performance libraries 5 | // 8 ago 2024 updated to intel ipp v2021.12, visual c++ v19.29.30154 6 | // seartl.dll md5 6f35648fbf2b386e3129ec82bb12d30d size 200704 7 | // 9 apr 2025 rem fillchar and move in case of Delphi 12.x (comes with asm optimized x64 functions) 8 | 9 | interface 10 | 11 | uses 12 | Winapi.Windows; 13 | 14 | const 15 | SEASubset = 'SeaRTL.DLL'; 16 | 17 | function SeaZero(Pdst: PByte; Len: NativeUint): Integer; cdecl; external SEASubset name 'ippsZero_8u'; 18 | function SeaCopy(const Psrc: PByte; Pdst: PByte; Len: NativeUint): Integer; cdecl; external SEASubset name 'ippsCopy_8u'; 19 | function SeaMove(const Psrc: PByte; Pdst: PByte; Len: NativeUint): Integer; cdecl; external SEASubset name 'ippsMove_8u'; 20 | function SeaSet(Val: Byte; Pdst: PByte; Len: NativeUint): Integer; cdecl; external SEASubset name 'ippsSet_8u'; 21 | function SeaFind(const Psrc: PByte; Len: NativeUint; const Pfind: PByte; Lenfind: NativeUint; Pindex: PNativeUint): Integer; cdecl; external SEASubset name 'ippsFind_8u'; 22 | function SeaCompare(const Psrc1: PByte; const Psrc2: PByte; Len: NativeInt; Presult: PNativeInt): Integer; cdecl; external SEASubset name 'ippsCompare_8u'; 23 | function SeaUpperCase(const PSrcDst: PByte; Len: NativeUint): Integer; cdecl; external SEASubset name 'ippsUppercaseLatin_8u_I'; 24 | function SeaReplace(const Psrc: PByte; Pdst: PByte; Len: NativeUint; oldVal: Byte; ipp8u: Byte): Integer; cdecl; external SEASubset name 'ippsReplaceC_8u'; 25 | 26 | implementation 27 | 28 | type 29 | TByteArray = array [0 .. 32767] of Byte; 30 | PByteArray = ^TByteArray; 31 | _ansichr = Ansichar; 32 | _WideStr = WideString; 33 | _RawByteStr = RawByteString; 34 | 35 | procedure PatchCode(Old, New: Pointer; Size: Integer); 36 | var 37 | NP, IR: DWORD; 38 | I: Integer; 39 | begin 40 | if VirtualProtect(Old, Size, PAGE_EXECUTE_READWRITE, NP) then 41 | begin 42 | for I := 0 to Size - 1 do 43 | PByteArray(Old)^[I] := PByteArray(New)^[I]; 44 | VirtualProtect(Old, Size, NP, IR); 45 | FlushInstructionCache(GetCurrentProcess, Old, Size); 46 | end; 47 | end; 48 | 49 | procedure RedirectCode(Func, RedirectFunc: Pointer); 50 | var 51 | NewJump: packed record Code: Byte; 52 | Distance: Integer; 53 | end; 54 | begin 55 | if (Func = nil) or (RedirectFunc = nil) then Exit; 56 | NewJump.Code := $E9; 57 | NewJump.Distance := Integer(NativeUint(RedirectFunc) - NativeUint(Func) - Sizeof(NewJump)); 58 | PatchCode(Func, @NewJump, Sizeof(NewJump)); 59 | end; 60 | 61 | procedure Fillchar2(var Dest; Count: NativeUint; Value: _ansichr); inline; 62 | begin 63 | if (Value = #0) then 64 | SeaZero(@Dest, Count) 65 | else 66 | SeaSet(Byte(Value), @Dest, Count); 67 | end; 68 | 69 | procedure Move2(const Source; var Dest; Count: NativeInt); inline; 70 | begin 71 | if Count > 0 then SeaMove(@Source, @Dest, Count); 72 | end; 73 | 74 | type 75 | TPosRawFunc = function(const SubStr, Str: _RawByteStr; Offset: Integer = 1): Integer; 76 | TPosWideFunc = function(const SubStr, Str: _WideStr; Offset: Integer = 1): Integer; 77 | TPosUnicodeFunc = function(const SubStr, Str: UnicodeString; Offset: Integer = 1): Integer; 78 | 79 | function RetrievePosRawAddr: Pointer; 80 | var 81 | f: TPosRawFunc; 82 | begin 83 | f := Pos; 84 | Result := @f; 85 | end; 86 | 87 | function RetrievePosWideAddr: Pointer; 88 | var 89 | f: TPosWideFunc; 90 | begin 91 | f := Pos; 92 | Result := @f; 93 | end; 94 | 95 | function RetrievePosUnicodeAddr: Pointer; 96 | var 97 | f: TPosUnicodeFunc; 98 | begin 99 | f := Pos; 100 | Result := @f; 101 | end; 102 | 103 | function PosUnicode(const SubStr, Str: UnicodeString; Offset: Integer = 1): Integer; 104 | var 105 | Idx: PByte; 106 | LenR: Integer; 107 | LenS: Integer; 108 | LenB: Integer; 109 | begin 110 | LenS := Length(Str); 111 | LenB := Length(SubStr); 112 | if (LenS < LenB) or (Offset > LenS) or (Offset < 1) then 113 | Result := 0 114 | else 115 | begin 116 | Idx := PByte(Str); 117 | Inc(Idx, (Offset - 1) * 2); 118 | SeaFind(Idx, (LenS - (Offset - 1)) * 2, PByte(SubStr), LenB * 2, @LenR); 119 | if LenR = -1 then 120 | Result := 0 121 | else 122 | begin 123 | Inc(LenR, (LenS * 2) - ((LenS - Offset + 1) * 2)); 124 | Result := Trunc(LenR / 2) + 1; 125 | end; 126 | end; 127 | end; 128 | 129 | function PosWide(const SubStr, Str: _WideStr; Offset: Integer = 1): Integer; 130 | var 131 | Idx: PByte; 132 | LenR: Integer; 133 | LenS: Integer; 134 | LenB: Integer; 135 | begin 136 | LenS := Length(Str); 137 | LenB := Length(SubStr); 138 | if (LenS < LenB) or (Offset > LenS) or (Offset < 1) then 139 | Result := 0 140 | else 141 | begin 142 | Idx := PByte(Str); 143 | Inc(Idx, (Offset - 1) * 2); 144 | SeaFind(Idx, (LenS - (Offset - 1)) * 2, PByte(SubStr), LenB * 2, @LenR); 145 | if LenR = -1 then 146 | Result := 0 147 | else 148 | begin 149 | Inc(LenR, (LenS * 2) - ((LenS - Offset + 1) * 2)); 150 | Result := Trunc(LenR / 2) + 1; 151 | end; 152 | end; 153 | end; 154 | 155 | function PosRaw(const SubStr, Str: _RawByteStr; Offset: Integer = 1): Integer; 156 | var 157 | Idx: PByte; 158 | LenR: Integer; 159 | LenS: Integer; 160 | LenB: Integer; 161 | begin 162 | LenS := Length(Str); 163 | LenB := Length(SubStr); 164 | if (LenS < LenB) or (Offset > LenS) or (Offset < 1) then 165 | Result := 0 166 | else 167 | begin 168 | Idx := PByte(Str); 169 | Inc(Idx, Offset - 1); 170 | SeaFind(Idx, LenS - Offset + 1, PByte(SubStr), LenB, @LenR); 171 | if LenR = -1 then 172 | Result := 0 173 | else 174 | begin 175 | Inc(LenR, LenS - (LenS - Offset + 1)); 176 | Result := LenR + 1; 177 | end; 178 | end; 179 | end; 180 | 181 | function OrigFillchar: Pointer; 182 | asm 183 | mov rax,offset System.@FillChar 184 | end; 185 | 186 | procedure PatchRTL64; 187 | begin 188 | {$IF CompilerVersion < 36.0} 189 | RedirectCode(@System.Move, @Move2); 190 | RedirectCode(OrigFillchar, @Fillchar2); 191 | {$IFEND} 192 | RedirectCode(RetrievePosRawAddr, @PosRaw); 193 | RedirectCode(RetrievePosWideAddr, @PosWide); 194 | RedirectCode(RetrievePosUnicodeAddr, @PosUnicode); 195 | end; 196 | 197 | initialization 198 | PatchRTL64; 199 | 200 | end. 201 | -------------------------------------------------------------------------------- /RDPWebBroker64.pas: -------------------------------------------------------------------------------- 1 | unit RDPWebBroker64; 2 | 3 | // 28 febr 2019 Roberto Della Pasqua www.dellapasqua.com 4 | // for better performances put RDPMM64 as first unit clause in project source 5 | // define SEAZLIB for deflate with intel ipp performance libraries 6 | // 26 febr 2020 buffer len check 7 | // 20 febr 2023 updated zlibdeflate for correct mime 8 | // be careful to set the correct content-type with utf-8 charset 9 | 10 | {$DEFINE SEAZLIB} 11 | 12 | interface 13 | 14 | uses Windows, Sysutils, System.Classes, Web.HTTPApp, Web.WebReq; 15 | 16 | type 17 | TWBHelper = class helper for TWebResponse 18 | public 19 | procedure ZlibDeflate; overload; 20 | end; 21 | 22 | implementation 23 | 24 | uses RDPZlib64; 25 | 26 | procedure TWBHelper.ZlibDeflate; // compress utf-8 text and json 27 | var 28 | ZBuff: TMemoryStream; 29 | Src, Dst: TBytes; 30 | Cl: string; 31 | begin 32 | Cl := Lowercase(ContentType); // example ContentType := 'application/json; charset="UTF-8"'; 33 | if ((Pos('text', Cl) > 0) or (Pos('json', Cl) > 0) and (Pos('utf-8', Cl) > 0)) then 34 | begin 35 | if ContentStream = nil then // use content string 36 | begin 37 | if (Length(Content) > 1500) and (Length(Content) < 10000000) then // 10MB 38 | begin 39 | Src := TEncoding.UTF8.GetBytes(Content); 40 | SeaZlib.Compress(Src, Dst); 41 | ZBuff := TMemoryStream.Create; 42 | ZBuff.Write(Dst, Length(Dst)); 43 | ContentStream := ZBuff; 44 | ContentStream.Seek(0,0); 45 | ContentEncoding := 'deflate'; 46 | ContentLength := ContentStream.Size; 47 | end; 48 | end 49 | else if (ContentStream.Size > 1500) and (ContentStream.Size < 10000000) then // 10MB 50 | begin 51 | ZBuff := TMemoryStream.Create; 52 | SeaZlib.CompressStream(ContentStream, ZBuff, Z_BEST_SPEED_AC); 53 | ContentStream.Size := ZBuff.Size; 54 | ContentStream.Write(ZBuff, ZBuff.Size); 55 | ContentEncoding := 'deflate'; 56 | ContentLength := ContentStream.Size; 57 | ZBuff.Free; 58 | end; 59 | end; 60 | end; 61 | 62 | end. 63 | -------------------------------------------------------------------------------- /RDPZlib64.pas: -------------------------------------------------------------------------------- 1 | unit RDPZlib64; 2 | 3 | // 28 febr 2019 Roberto Della Pasqua www.dellapasqua.com 4 | // zlib library enhanced with Intel IPP performance libraries 5 | // 3 march 2020 added inflate support 6 | // 10 jan 2023 updated to zlib 1.2.13 Intel IPP latest version 7 | // 7 mar 2024 small refactor about buffer size (ideally should be dynamic) 8 | // 8 ago 2024 updated to zlib v1.3.1, intel ipp v2021.12, visual c++ v19.29.30154 9 | // solved random av on z77 files 10 | // please check github repo for zlib options, consider using -2 only with utf8 buffers 11 | // seazip.dll md5 5c4409f5c93f490119134bb5477a89fb size 982016 12 | 13 | interface 14 | 15 | uses 16 | System.SysUtils, System.Classes; 17 | 18 | const 19 | ZLIBDLL = 'SeaZIP.dll'; 20 | ZLIB_VERSION: PAnsiChar = '1.3.1'; 21 | ZLIB_VERNUM = $1310; 22 | Z_FINISH = 4; 23 | Z_NO_FLUSH = 0; 24 | Z_OK = 0; 25 | Z_STREAM_END = 1; 26 | Z_ERRNO = (-1); 27 | Z_BUF_ERROR = (-5); 28 | Z_NO_COMPRESSION = 0; 29 | Z_BEST_SPEED_AC = -2; // intel zlib optimize 30 | Z_BEST_SPEED = 1; 31 | Z_BEST_COMPRESSION = 9; 32 | Z_DEFAULT_COMPRESSION = 4; 33 | Z_DEFLATED = 8; 34 | Z_MAX_WBITS = -15; 35 | Z_MEM_LEVEL = 9; 36 | Z_DEFAULT_STRATEGY = 0; 37 | 38 | const 39 | Z_errmsg: array [0 .. 9] of string = ('need dictionary', 'stream end', '', 'file error', 'stream error', 'data error', 'insufficient memory', 'buffer error', 'incompatible version', ''); 40 | 41 | type 42 | EZCompressionError = class(Exception); 43 | 44 | z_stream = record // sizeof 88 45 | next_in: PByte; 46 | avail_in: Cardinal; 47 | total_in: Cardinal; 48 | next_out: PByte; 49 | avail_out: Cardinal; 50 | total_out: Cardinal; 51 | msg: MarshaledAString; 52 | state: Pointer; 53 | zalloc: Pointer; 54 | zfree: Pointer; 55 | opaque: Pointer; 56 | data_type: Integer; 57 | adler: Cardinal; 58 | reserved: Cardinal; 59 | end; 60 | 61 | type 62 | SeaZlib = class 63 | // deflate 64 | class procedure Compress(const Src: Pointer; out Dest: Pointer; SrcSize: Integer; out DestSize: Integer; Level: Integer = Z_BEST_SPEED_AC); overload; // default -2 accelerated 65 | class procedure Compress(const Src: TBytes; out Dest: TBytes; Level: Integer = Z_BEST_SPEED_AC); overload; 66 | class procedure CompressStream(Src: TStream; Dest: TStream; Level: Integer = Z_BEST_SPEED_AC); 67 | // inflate 68 | class procedure Decompress(const Src: Pointer; out Dest: Pointer; SrcSize: Integer; out DestSize: Integer); overload; 69 | class procedure Decompress(const Src: TBytes; out Dest: TBytes); overload; 70 | class procedure DecompressStream(Src: TStream; Dest: TStream); 71 | end; 72 | 73 | implementation 74 | 75 | // deflate 76 | function DeflateInit(var strm: z_stream; Level: Integer; version: PAnsiChar; stream_size: Integer): Integer; cdecl; external ZLIBDLL name 'deflateInit_'; 77 | function DeflateInit2(var strm: z_stream; Level, method, windowBits, memLevel, strategy: Integer; version: PAnsiChar; stream_size: Integer): Integer; cdecl; external ZLIBDLL name 'deflateInit2_'; 78 | function Deflate(var strm: z_stream; flush: Integer): Integer; cdecl; external ZLIBDLL name 'deflate'; 79 | function DeflateEnd(var strm: z_stream): Integer; cdecl; external ZLIBDLL name 'deflateEnd'; 80 | // inflate 81 | function InflateInit(var strm: z_stream; version: PAnsiChar; stream_size: Integer): Integer; cdecl; external ZLIBDLL name 'inflateInit_'; 82 | function InflateInit2(var strm: z_stream; windowBits: Integer; version: PAnsiChar; stream_size: Integer): Integer; cdecl; external ZLIBDLL name 'inflateInit2_'; 83 | function Inflate(var strm: z_stream; flush: Integer): Integer; cdecl; external ZLIBDLL name 'inflate'; 84 | function InflateEnd(var strm: z_stream): Integer; cdecl; external ZLIBDLL name 'inflateEnd'; 85 | 86 | class procedure SeaZlib.Compress(const Src: Pointer; out Dest: Pointer; SrcSize: Integer; out DestSize: Integer; Level: Integer = Z_BEST_SPEED_AC); 87 | var 88 | zstream: z_stream; 89 | zInit, zDeflate: Integer; 90 | begin 91 | FillChar(zstream, SizeOf(z_stream), 0); 92 | DestSize := SrcSize; // in the worse case dest len is equal at source len 93 | GetMem(Dest, DestSize); 94 | try 95 | zstream.next_in := Src; 96 | zstream.avail_in := SrcSize; 97 | zstream.next_out := Dest; 98 | zstream.avail_out := DestSize; 99 | zInit := DeflateInit2(zstream, Level, Z_DEFLATED, Z_MAX_WBITS, Z_MEM_LEVEL, Z_DEFAULT_STRATEGY, ZLIB_VERSION, SizeOf(z_stream)); 100 | if zInit > Z_ERRNO then 101 | begin 102 | zDeflate := Deflate(zstream, Z_FINISH); 103 | if ((zDeflate <> Z_STREAM_END) and (zDeflate <> Z_BUF_ERROR)) or (zDeflate < Z_OK) then 104 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 105 | end 106 | else 107 | raise EZCompressionError.Create(Z_errmsg[2 - zInit]); 108 | zDeflate := DeflateEnd(zstream); 109 | if zDeflate < Z_OK then 110 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 111 | ReallocMem(Dest, zstream.total_out); 112 | DestSize := zstream.total_out; 113 | except 114 | FreeMem(Dest); 115 | raise; 116 | end; 117 | end; 118 | 119 | class procedure SeaZlib.Decompress(const Src: Pointer; out Dest: Pointer; SrcSize: Integer; out DestSize: Integer); 120 | const 121 | BufferLen = 131072; 122 | var 123 | zstream: z_stream; 124 | zInit, zInflate: Integer; 125 | begin 126 | FillChar(zstream, SizeOf(z_stream), 0); 127 | DestSize := SrcSize * 3; 128 | GetMem(Dest, DestSize); 129 | try 130 | zstream.next_in := Src; 131 | zstream.avail_in := SrcSize; 132 | zstream.next_out := Dest; 133 | zstream.avail_out := DestSize; 134 | zInit := InflateInit2(zstream, Z_MAX_WBITS, ZLIB_VERSION, SizeOf(z_stream)); 135 | if zInit > Z_ERRNO then 136 | begin 137 | zInflate := Inflate(zstream, Z_NO_FLUSH); 138 | if zInflate < Z_OK then 139 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 140 | while zInflate <> Z_STREAM_END do 141 | begin 142 | Inc(DestSize, BufferLen); 143 | ReallocMem(Dest, DestSize); 144 | zstream.next_out := PByte(Dest) + zstream.total_out; 145 | zstream.avail_out := BufferLen; 146 | zInflate := Inflate(zstream, Z_NO_FLUSH); 147 | if zInflate < Z_OK then 148 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 149 | end; 150 | if (zInflate <> Z_STREAM_END) and (zInflate <> Z_BUF_ERROR) then 151 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 152 | end 153 | else 154 | raise EZCompressionError.Create(Z_errmsg[2 - zInit]); 155 | zInflate := InflateEnd(zstream); 156 | if zInflate < Z_OK then 157 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 158 | ReallocMem(Dest, zstream.total_out); 159 | DestSize := zstream.total_out; 160 | except 161 | FreeMem(Dest); 162 | raise; 163 | end; 164 | end; 165 | 166 | class procedure SeaZlib.Compress(const Src: TBytes; out Dest: TBytes; Level: Integer = Z_BEST_SPEED_AC); 167 | var 168 | zstream: z_stream; 169 | zInit, zDeflate: Integer; 170 | begin 171 | FillChar(zstream, SizeOf(z_stream), 0); 172 | SetLength(Dest, Length(Src)); 173 | // in the worse case dest len is equal at source len 174 | try 175 | zstream.next_in := @Src[0]; 176 | zstream.avail_in := Length(Src); 177 | zstream.next_out := @Dest[0]; 178 | zstream.avail_out := Length(Dest); 179 | zInit := DeflateInit2(zstream, Level, Z_DEFLATED, Z_MAX_WBITS, Z_MEM_LEVEL, Z_DEFAULT_STRATEGY, ZLIB_VERSION, SizeOf(z_stream)); 180 | if zInit > Z_ERRNO then 181 | begin 182 | zDeflate := Deflate(zstream, Z_FINISH); 183 | if ((zDeflate <> Z_STREAM_END) and (zDeflate <> Z_BUF_ERROR)) or (zDeflate < Z_OK) then 184 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 185 | end 186 | else 187 | raise EZCompressionError.Create(Z_errmsg[2 - zInit]); 188 | zDeflate := DeflateEnd(zstream); 189 | if zDeflate < Z_OK then 190 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 191 | SetLength(Dest, zstream.total_out); 192 | except 193 | SetLength(Dest, 0); 194 | raise; 195 | end; 196 | end; 197 | 198 | class procedure SeaZlib.Decompress(const Src: TBytes; out Dest: TBytes); 199 | const 200 | BufferLen = 131072; 201 | var 202 | zstream: z_stream; 203 | zInit, zInflate: Integer; 204 | begin 205 | FillChar(zstream, SizeOf(z_stream), 0); 206 | SetLength(Dest, Length(Src) * 3); 207 | try 208 | zstream.next_in := @Src[0]; 209 | zstream.avail_in := Length(Src); 210 | zstream.next_out := @Dest[0]; 211 | zstream.avail_out := Length(Dest); 212 | zInit := InflateInit2(zstream, Z_MAX_WBITS, ZLIB_VERSION, SizeOf(z_stream)); 213 | if zInit > Z_ERRNO then 214 | begin 215 | zInflate := Inflate(zstream, Z_NO_FLUSH); 216 | if zInflate < Z_OK then 217 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 218 | while zInflate <> Z_STREAM_END do 219 | begin 220 | SetLength(Dest, Length(Dest) + BufferLen); 221 | zstream.next_out := PByte(@Dest[0]) + zstream.total_out; 222 | zstream.avail_out := BufferLen; 223 | zInflate := Inflate(zstream, Z_NO_FLUSH); 224 | if zInflate < Z_OK then 225 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 226 | end; 227 | if (zInflate <> Z_STREAM_END) and (zInflate <> Z_BUF_ERROR) then 228 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 229 | end 230 | else 231 | raise EZCompressionError.Create(Z_errmsg[2 - zInit]); 232 | zInflate := InflateEnd(zstream); 233 | if zInflate < Z_OK then 234 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 235 | SetLength(Dest, zstream.total_out); 236 | except 237 | SetLength(Dest, 0); 238 | raise; 239 | end; 240 | end; 241 | 242 | class procedure SeaZlib.CompressStream(Src: TStream; Dest: TStream; Level: Integer = Z_BEST_SPEED_AC); 243 | const 244 | BufferLen = 131072; 245 | var 246 | zstream: z_stream; 247 | zInit, zDeflate: Integer; 248 | InBuff, OutBuff: Pointer; 249 | InBuffSize, OutBuffSize: Integer; 250 | begin 251 | FillChar(zstream, SizeOf(z_stream), 0); 252 | GetMem(InBuff, BufferLen); 253 | GetMem(OutBuff, BufferLen); 254 | try 255 | zInit := DeflateInit2(zstream, Level, Z_DEFLATED, Z_MAX_WBITS, Z_MEM_LEVEL, Z_DEFAULT_STRATEGY, ZLIB_VERSION, SizeOf(z_stream)); 256 | if zInit > Z_ERRNO then 257 | begin 258 | InBuffSize := Src.Read(InBuff^, BufferLen); 259 | while InBuffSize > 0 do 260 | begin 261 | zstream.next_in := InBuff; 262 | zstream.avail_in := InBuffSize; 263 | repeat 264 | zstream.next_out := OutBuff; 265 | zstream.avail_out := BufferLen; 266 | zDeflate := Deflate(zstream, Z_NO_FLUSH); 267 | if zDeflate < Z_OK then 268 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 269 | OutBuffSize := BufferLen - zstream.avail_out; 270 | if OutBuffSize > 0 then 271 | Dest.Write(OutBuff^, OutBuffSize) 272 | else 273 | break; 274 | until (zstream.avail_in = 0) and (zstream.avail_out > 0); 275 | InBuffSize := Src.Read(InBuff^, BufferLen); 276 | end; 277 | repeat 278 | zstream.next_out := OutBuff; 279 | zstream.avail_out := BufferLen; 280 | zDeflate := Deflate(zstream, Z_FINISH); 281 | if zDeflate < Z_OK then 282 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 283 | OutBuffSize := BufferLen - zstream.avail_out; 284 | if OutBuffSize > 0 then 285 | Dest.Write(OutBuff^, OutBuffSize) 286 | else 287 | break; 288 | until (zDeflate = Z_STREAM_END) and (zstream.avail_out > 0); 289 | zDeflate := DeflateEnd(zstream); 290 | if zDeflate < Z_OK then 291 | raise EZCompressionError.Create(Z_errmsg[2 - zDeflate]); 292 | end; 293 | finally 294 | FreeMem(InBuff); 295 | FreeMem(OutBuff); 296 | end; 297 | end; 298 | 299 | class procedure SeaZlib.DecompressStream(Src: TStream; Dest: TStream); 300 | const 301 | BufferLen = 131072; 302 | var 303 | zstream: z_stream; 304 | zInit, zInflate: Integer; 305 | InBuff, OutBuff: Pointer; 306 | InBuffSize, OutBuffSize: Integer; 307 | begin 308 | FillChar(zstream, SizeOf(z_stream), 0); 309 | GetMem(InBuff, BufferLen); 310 | GetMem(OutBuff, BufferLen); 311 | try 312 | zInit := InflateInit2(zstream, Z_MAX_WBITS, ZLIB_VERSION, SizeOf(z_stream)); 313 | if zInit > Z_ERRNO then 314 | begin 315 | InBuffSize := Src.Read(InBuff^, BufferLen); 316 | while InBuffSize > 0 do 317 | begin 318 | zstream.next_in := InBuff; 319 | zstream.avail_in := InBuffSize; 320 | repeat 321 | zstream.next_out := OutBuff; 322 | zstream.avail_out := BufferLen; 323 | zInflate := Inflate(zstream, Z_NO_FLUSH); 324 | if zInflate < Z_OK then 325 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 326 | OutBuffSize := BufferLen - zstream.avail_out; 327 | if OutBuffSize > 0 then 328 | Dest.Write(OutBuff^, OutBuffSize) 329 | else 330 | break; 331 | until (zstream.avail_in = 0) and (zstream.avail_out > 0); 332 | InBuffSize := Src.Read(InBuff^, BufferLen); 333 | end; 334 | repeat 335 | zstream.next_out := OutBuff; 336 | zstream.avail_out := BufferLen; 337 | zInflate := Inflate(zstream, Z_FINISH); 338 | if zInflate < Z_OK then 339 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 340 | OutBuffSize := BufferLen - zstream.avail_out; 341 | if OutBuffSize > 0 then 342 | Dest.Write(OutBuff^, OutBuffSize) 343 | else 344 | break; 345 | until (zInflate = Z_STREAM_END) and (zstream.avail_out > 0); 346 | zInflate := InflateEnd(zstream); 347 | if zInflate < Z_OK then 348 | raise EZCompressionError.Create(Z_errmsg[2 - zInflate]); 349 | end; 350 | finally 351 | FreeMem(InBuff); 352 | FreeMem(OutBuff); 353 | end; 354 | end; 355 | 356 | end. 357 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | Sea RTL subset for Delphi 64bit 2 | 3 | Object Pascal wrappers from Intel Integrated Performance Primitives and Intel Threading Building Blocks royalty-free packages 4 | 5 | 17 June 2019 Roberto Della Pasqua www.dellapasqua.com
6 | 24 August 2022 DLL built with the latest stable Intel oneAPI and TBB ver. 2021.6
7 | 10 January 2023 updated zlib to 1.2.13 with latest Intel IPP ver. 2021.7
8 | 20 February 2023 updated webbroker deflate helper for reliability
9 | 02 November 2023 updated oneTBB allocator
10 | 8 August 2024 updated to Intel IPP v2021.12, zlib v1.3.1, visual c++ v19.29.30154
11 | 30 October 2024 updated to Intel IPP v2022.0, visual c++ v19.41.34123
12 | 09 April 2025 rem fillchar and move in case of Delphi 12.x (comes with asm optimized x64 functions)
13 | 11 April 2025 updated to intel one api v2022.1, visual c++ v19.43.34810
14 | -> check SeaMM_static.dll to avoid dependancies to visual c++ crt dll (if you use only the mm)
15 | 14 April 2025 added thread safe concurrent queue from Intel IPP v2022.1, visual c++ v19.43.34810
16 | 17 | This folder contains: 18 | 19 | - SeaMM.dll memory manager (md5 df1e5b489d2f9ac325d194a9dc67c8bc size 107520) 20 | - SeaRTL.dll simd enabled rtl subset routines (md5 6f35648fbf2b386e3129ec82bb12d30d size 200704) 21 | - SeaZIP.dll accelerated zlib compression (md5 5c4409f5c93f490119134bb5477a89fb size 982016) 22 | - SeaQPar.dll thread safe concurrent queue (md5 10eb346b9a887eb7b7d11176645a12aa) 23 | - RDPMM64.pas wrapper for memory manager (put this unit as first unit clause in project source) 24 | - RDPSimd64.pas wrapper for simd rtl api 25 | - RDPQueue64.pas wrapper for thread safe concurrent queue 26 | - RDPZlib64.pas wrapper for zlib deflate (level -2 AC mode in deflate call should be used over UTF-8 strings for web optimization)
27 | - RDPWebBroker64.pas utils to enhance webbroker web apps
28 | - SeaIISFilter ultra-fast realtime deflate filter for IIS web server (5x faster than default gzip) 29 | - License.txt for legal terms 30 |
31 |

32 | A common Delphi web framework tested with apachebench and 100 concurrent users (vm windows 2022 intel 9900k)
33 | (This enhancement is achieved in highly threaded apps doing concurrent memory and search operations)
34 |
35 | About zlib IPP accelerated: you can use symbolic name Z_IPP_FAST_COMPRESSION which is equal to -2
36 | Introduced new sub-ranges of compression levels from 11 to 29
37 | The standard levels 1..9 are compatible with original Zlib
38 | Levels 11..19 are similar to 1..9, but fit better when compressing large files (more than 1 MB)
39 | Levels 21..29 are for highly compressible files with compression ratio equal to 30x and higher 40 |

41 | If you want enable accelerated zlib programmatically into your WebBroker app, just add one line of code in afterdispatch event: 42 | 43 | - procedure TWebModule.WebModuleAfterDispatch(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 44 | - begin 45 | - Response.ZlibDeflate; 46 | - end; 47 | 48 | The library is well tested, run on Intel and Amd x64 Windows, if you found any trouble please notify me;
49 | big thanks to the Delphi community and its great coders, in particular for the support received from Bruno Fierens [TMS](https://www.tmssoftware.com/) and Daniele Teti [DMVC](https://github.com/danieleteti/delphimvcframework).
50 | 51 | Contact me: roberto dot dellapasqua at live.com 52 | 53 | Thank you and best regards 54 | 55 | Roberto Della Pasqua 56 | -------------------------------------------------------------------------------- /RobiMM.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/RobiMM.gif -------------------------------------------------------------------------------- /SeaIISFilter/SEA.stat: -------------------------------------------------------------------------------- 1 | [Stats] 2 | EditorSecs=8300 3 | DesignerSecs=1 4 | InspectorSecs=14 5 | CompileSecs=37662 6 | OtherSecs=560 7 | StartTime=21/06/2018 10:51:12 8 | RealKeys=0 9 | EffectiveKeys=0 10 | DebugSecs=3828 11 | -------------------------------------------------------------------------------- /SeaIISFilter/SeaIISFilter.dpr: -------------------------------------------------------------------------------- 1 | library SeaIISFilter; 2 | 3 | // 19 june 2018 Roberto Della Pasqua www.dellapasqua.com 4 | // highly iterative 5 | // low level parallel SIMD 6 | // threadpool wrapper 7 | // zero memory copy 8 | // data structure deduplication 9 | // 5x faster than default IIS 10 gzip at the same ratio (I7 cpu 4/8 core) 10 | 11 | { .$DEFINE DEBUGFILE } 12 | {$O+} 13 | {$WEAKLINKRTTI ON} 14 | {$MINENUMSIZE 4} 15 | 16 | uses 17 | Rdpmm64, 18 | Rdpsimd64, 19 | Rdpzlib64, 20 | Windows, 21 | Sysutils; 22 | 23 | // SDK IIS 7.0 httpfilt.h 24 | 25 | const 26 | Hse_version_major = 7; 27 | Hse_version_minor = 0; 28 | Hse_log_buffer_len = 80; 29 | Hse_max_ext_dll_name_len = 256; 30 | Http_filter_revision = $70000; 31 | Sf_max_username = (256 + 1); 32 | Sf_max_password = (256 + 1); 33 | Sf_max_auth_type = (32 + 1); 34 | Sf_max_filter_desc_len = (256 + 1); 35 | Sf_status_req_finished = $8000000; 36 | Sf_status_req_finished_keep_conn = $8000001; 37 | Sf_status_req_next_notification = $8000002; 38 | Sf_status_req_handled_notification = $8000003; 39 | Sf_status_req_error = $8000004; 40 | Sf_status_req_read_next = $8000005; 41 | Sf_denied_logon = $00000001; 42 | Sf_denied_resource = $00000002; 43 | Sf_denied_filter = $00000004; 44 | Sf_denied_application = $00000008; 45 | Sf_denied_by_config = $00010000; 46 | Sf_notify_secure_port = $00000001; 47 | Sf_notify_nonsecure_port = $00000002; 48 | Sf_notify_read_raw_data = $00008000; 49 | Sf_notify_preproc_headers = $00004000; 50 | Sf_notify_url_map = $00001000; 51 | Sf_notify_authentication = $00002000; 52 | Sf_notify_access_denied = $00000800; 53 | Sf_notify_auth_complete = $04000000; 54 | Sf_notify_send_response = $00000040; 55 | Sf_notify_send_raw_data = $00000400; 56 | Sf_notify_end_of_request = $00000080; 57 | Sf_notify_log = $00000200; 58 | Sf_notify_end_of_net_session = $00000100; 59 | Sf_notify_extension_trigger = $02000000; 60 | Sf_notify_order_high = $00080000; 61 | Sf_notify_order_medium = $00040000; 62 | Sf_notify_order_low = $00020000; 63 | Sf_notify_order_default = Sf_notify_order_low; 64 | Sf_notify_order_mask = (Sf_notify_order_high or Sf_notify_order_medium or Sf_notify_order_low); 65 | 66 | type 67 | Sf_req_type = (Sf_req_send_response_header, Sf_req_add_headers_on_denial, Sf_req_set_next_read_size, Sf_req_set_proxy_info, 68 | Sf_req_get_connid, Sf_req_set_certificate_info, Sf_req_get_property, Sf_req_normalize_url, Sf_req_disable_notifications); 69 | 70 | Sf_property_iis = (Sf_property_ssl_ctxt, Sf_property_instance_num_id); 71 | Sf_priority_type = (High_priority, Medium_priority, Low_priority, Default_priority); 72 | 73 | Thttp_filter_context = record 74 | Cbsize: Dword; 75 | Revision: Dword; 76 | Servercontext: Pvoid; 77 | Ulreserved: Dword; 78 | Fissecureport: Bool; 79 | Pfiltercontext: Pvoid; 80 | Getservervariable: Pvoid; 81 | Addresponseheaders: Pvoid; 82 | Writeclient: Pvoid; 83 | Allocmem: Pvoid; 84 | Serversupportfunc: Pvoid; 85 | end; 86 | 87 | Http_filter_context = Thttp_filter_context; 88 | Phttp_filter_context = ^Http_filter_context; 89 | 90 | Tgetservervariable = function(Pfc: Phttp_filter_context; Variablename: Pansichar; Buffer: Lpvoid; Buffsize: Pdword) 91 | : Bool; stdcall; 92 | Taddresponseheaders = function(Pfc: Phttp_filter_context; Headers: Pansichar; Reserved: Dword): Bool; stdcall; 93 | Twriteclient = function(Pfc: Phttp_filter_context; Buffer: Lpvoid; Dwbytes: Lpdword; Reserved: Dword): Bool; stdcall; 94 | Tallocmem = function(Pfc: Phttp_filter_context; Cbsize: Dword; Dwreserved: Dword): Lpvoid; stdcall; 95 | Tserversupportfunc = function(Pfc: Phttp_filter_context; Sfreq: Sf_req_type; Pdata: Pvoid; Ul1: Dword; Ul2: Dword) 96 | : Bool; stdcall; 97 | 98 | Thttp_filter_raw_data = record 99 | Pvindata: Pvoid; 100 | Cbindata: Dword; 101 | Cbinbuffer: Dword; 102 | Dwreserved: Dword; 103 | end; 104 | 105 | Http_filter_raw_data = Thttp_filter_raw_data; 106 | Phttp_filter_raw_data = ^Http_filter_raw_data; 107 | 108 | Tgetheader = function(Pfc: Phttp_filter_context; Lpszname: Pansichar; Lpvbuffer: Lpvoid; Lpdwsize: Lpdword): Bool; stdcall; 109 | Tsetheader = function(Pfc: Phttp_filter_context; Lpszname: Pansichar; Lpszvalue: Pansichar): Bool; stdcall; 110 | Taddheader = function(Pfc: Phttp_filter_context; Lpszname: Pansichar; Lpszvalue: Pansichar): Bool; stdcall; 111 | Tgetusertoken = function(Pfc: Phttp_filter_context; Phtoken: Phandle): Bool; stdcall; 112 | 113 | Thttp_filter_preproc_headers = record 114 | Getheader: Pvoid; 115 | Setheader: Pvoid; 116 | Addheader: Pvoid; 117 | Dwreserved: Dword; 118 | end; 119 | 120 | Http_filter_preproc_headers = Thttp_filter_preproc_headers; 121 | Phttp_filter_preproc_headers = ^Http_filter_preproc_headers; 122 | Http_filter_send_response = Http_filter_preproc_headers; 123 | Thttp_filter_send_response = Thttp_filter_preproc_headers; 124 | Phttp_filter_send_response = ^Http_filter_send_response; 125 | 126 | Thttp_filter_authent = record 127 | Pszuser: Pansichar; 128 | Cbuserbuff: Dword; 129 | Pszpassword: Pansichar; 130 | Cbpasswordbuff: Dword; 131 | end; 132 | 133 | Http_filter_authent = Thttp_filter_authent; 134 | Phttp_filter_authent = ^Http_filter_authent; 135 | 136 | Thttp_filter_url_map = record 137 | Pszurl: Pansichar; 138 | Pszphysicalpath: Pansichar; 139 | Cbpathbuff: Dword; 140 | end; 141 | 142 | Http_filter_url_map = Thttp_filter_url_map; 143 | Phttp_filter_url_map = ^Http_filter_url_map; 144 | 145 | Thttp_filter_url_map_ex = record 146 | Pszurl: Pansichar; 147 | Pszphysicalpath: Pansichar; 148 | Cbpathbuff: Dword; 149 | Dwflags: Dword; 150 | Cchmatchingpath: Dword; 151 | Cchmatchingurl: Dword; 152 | Pszscriptmapentry: Pansichar; 153 | end; 154 | 155 | Http_filter_url_map_ex = Thttp_filter_url_map_ex; 156 | Phttp_filter_url_map_ex = ^Http_filter_url_map_ex; 157 | 158 | Thttp_filter_access_denied = record 159 | Pszurl: Pansichar; 160 | Pszphysicalpath: Pansichar; 161 | Dwreason: Dword; 162 | end; 163 | 164 | Http_filter_access_denied = Thttp_filter_access_denied; 165 | Phttp_filter_access_denied = ^Http_filter_access_denied; 166 | 167 | Thttp_filter_log = record 168 | Pszclienthostname: Pansichar; 169 | Pszclientusername: Pansichar; 170 | Pszservername: Pansichar; 171 | Pszoperation: Pansichar; 172 | Psztarget: Pansichar; 173 | Pszparameters: Pansichar; 174 | Dwhttpstatus: Dword; 175 | Dwwin32status: Dword; 176 | Dwbytessent: Dword; 177 | Dwbytesrecvd: Dword; 178 | Mstimeforprocessing: Dword; 179 | end; 180 | 181 | Http_filter_log = Thttp_filter_log; 182 | Phttp_filter_log = ^Http_filter_log; 183 | 184 | Thttp_filter_auth_complete_info = record 185 | Getheader: Pvoid; 186 | Setheader: Pvoid; 187 | Addheader: Pvoid; 188 | Getusertoken: Tgetusertoken; 189 | Httpstatus: Dword; 190 | Fresetauth: Bool; 191 | Dwreserved: Dword; 192 | end; 193 | 194 | Http_filter_auth_complete_info = Thttp_filter_auth_complete_info; 195 | Phttp_filter_auth_complete_info = ^Http_filter_auth_complete_info; 196 | 197 | Thttp_filter_extension_trigger_info = record 198 | Dwtriggertype: Dword; 199 | Pvtriggercontext: Pvoid; 200 | end; 201 | 202 | Http_filter_extension_trigger_info = Thttp_filter_extension_trigger_info; 203 | Phttp_filter_extension_trigger_info = ^Http_filter_extension_trigger_info; 204 | 205 | Thttp_filter_version = record 206 | Dwserverfilterversion: Dword; 207 | Dwfilterversion: Dword; 208 | Lpszfilterdesc: array [0 .. Sf_max_filter_desc_len - 1] of Ansichar; 209 | Dwflags: Dword; 210 | end; 211 | 212 | Http_filter_version = Thttp_filter_version; 213 | Phttp_filter_version = ^Http_filter_version; 214 | 215 | Tthstruct = class 216 | strict private 217 | Cpowered: Tbytes; 218 | Casp: Tbytes; 219 | Caspold: Tbytes; 220 | Cphp: Tbytes; 221 | Cjava: Tbytes; 222 | Caspx: Tbytes; 223 | Cdll: Tbytes; 224 | Chttp1: Tbytes; 225 | Chttp2: Tbytes; 226 | Ccrlf: Tbytes; 227 | // 228 | Cctext: Tbytes; 229 | Cctext2: Tbytes; 230 | Cctext3: Tbytes; 231 | Cctext4: Tbytes; 232 | Cctext5: Tbytes; 233 | // 234 | Caccepttext: Tbytes; 235 | // 236 | Ccl: Tbytes; 237 | Ctransfer: Tbytes; 238 | Ccontent: Tbytes; 239 | Clength: Tbytes; 240 | Caccept: Tbytes; 241 | Cdeflate: Tbytes; 242 | Cgzip: Tbytes; 243 | Cxgzip: Tbytes; 244 | Cendline: Tbytes; 245 | Creplace: Tbytes; 246 | Cctdeflate: Tbytes; 247 | // 248 | Fthreadid: Dword; 249 | Fzlevel: Integer; 250 | // 251 | Pheaders: Pvoid; 252 | Pheaderslen: Integer; 253 | Gpvindata: Pvoid; 254 | Gcbindata: Cardinal; 255 | Gbuffer: Pvoid; 256 | Gbufsize: Cardinal; 257 | Ibuffer: Pvoid; 258 | Ibufsize: Integer; 259 | Ibufferts: Pvoid; 260 | // 261 | Clen: Integer; 262 | Clen2: Integer; 263 | Clen3: Integer; 264 | Headers: Pvoid; 265 | Helpers: Pansichar; 266 | Helperp: Pbyte; 267 | // 268 | Qstarttime: Int64; 269 | Qendtime: Int64; 270 | Qfrequency: Int64; 271 | Qelapsedtime: Int64; 272 | Qtotalhits: Int64; 273 | Qtotalbytes: Int64; 274 | Qtotalbytesc: Int64; 275 | {$IFDEF DEBUGFILE} 276 | Debugs: Ansistring; 277 | {$ENDIF} 278 | protected 279 | constructor Create; 280 | destructor Destroy; override; 281 | public 282 | procedure Treaturlmap(Pfc: Phttp_filter_context; Pvnotification: Pvoid); 283 | procedure Treatsendresponse(Pfc: Phttp_filter_context; Pvnotification: Pvoid); 284 | procedure Treatsendrawdata(Pfc: Phttp_filter_context; Pvnotification: Pvoid); 285 | procedure Treatendofrequest(Pfc: Phttp_filter_context); 286 | end; 287 | 288 | threadvar Thinit: Boolean; 289 | threadvar Thwork: Tthstruct; 290 | 291 | constructor Tthstruct.Create; 292 | begin 293 | Cpowered := Tencoding.Ascii.Getbytes('X-Powered-By:'); 294 | Casp := Tencoding.Ascii.Getbytes('asp.net'); 295 | Caspold := Tencoding.Ascii.Getbytes('asp'); 296 | Cphp := Tencoding.Ascii.Getbytes('php'); 297 | Cjava := Tencoding.Ascii.Getbytes('jsp'); 298 | Caspx := Tencoding.Ascii.Getbytes('aspx'); 299 | Cdll := Tencoding.Ascii.Getbytes('dll'); 300 | Chttp1 := Tencoding.Ascii.Getbytes('HTTP/1.1 200 OK'); 301 | Chttp2 := Tencoding.Ascii.Getbytes('HTTP/2'); 302 | Ccrlf := Tencoding.Ascii.Getbytes(#13#10#13#10); 303 | // 304 | Cctext := Tencoding.Ascii.Getbytes('Content-Type: text/'); 305 | Cctext2 := Tencoding.Ascii.Getbytes('Content-Type: message/'); 306 | Cctext3 := Tencoding.Ascii.Getbytes('Content-Type: application/javascript'); 307 | Cctext4 := Tencoding.Ascii.Getbytes('Content-Type: application/x-javascript'); 308 | Cctext5 := Tencoding.Ascii.Getbytes('Content-Type: application/xml'); 309 | // 310 | Caccepttext := Tencoding.Ascii.Getbytes('Accept: text/html'); 311 | // 312 | Ccl := Tencoding.Ascii.Getbytes('<%CL%>'); 313 | Ctransfer := Tencoding.Ascii.Getbytes('Transfer-Encoding:'); 314 | Ccontent := Tencoding.Ascii.Getbytes('Content-Encoding:'); 315 | Clength := Tencoding.Ascii.Getbytes('Content-Length:'); 316 | Caccept := Tencoding.Ascii.Getbytes('HTTP_ACCEPT_ENCODING'); 317 | Cdeflate := Tencoding.Ascii.Getbytes('deflate'); 318 | Cgzip := Tencoding.Ascii.Getbytes('gzip'); 319 | Cxgzip := Tencoding.Ascii.Getbytes('x-gzip'); 320 | Cendline := Tencoding.Ascii.Getbytes(#13#10); 321 | Creplace := Tencoding.Ascii.Getbytes('%PAR%'); 322 | Cctdeflate := Tencoding.Ascii.Getbytes('Content-Encoding: deflate'); 323 | // 324 | Fthreadid := Getcurrentthreadid; 325 | Fzlevel := 1; 326 | Getmem(Ibufferts, 256); 327 | // 328 | Queryperformancefrequency(Qfrequency); 329 | Qelapsedtime := 0; 330 | Qtotalhits := 0; 331 | Qtotalbytes := 0; 332 | Qtotalbytesc := 0; 333 | // 334 | Thinit := True; 335 | inherited; 336 | end; 337 | 338 | destructor Tthstruct.Destroy; 339 | begin 340 | Freemem(Ibufferts); 341 | inherited; 342 | end; 343 | 344 | procedure Tthstruct.Treatendofrequest(Pfc: Phttp_filter_context); 345 | begin 346 | if Dword(Pfc^.Pfiltercontext) = 4 then // zerocopy buffering 347 | begin 348 | try 349 | Queryperformancecounter(Qstarttime); 350 | Ibuffer := nil; 351 | Seazlib.Compress(Gpvindata, Gcbindata, Ibuffer, Ibufsize); 352 | Queryperformancecounter(Qendtime); 353 | Inc(Qelapsedtime, Qendtime - Qstarttime); 354 | Inc(Qtotalhits); 355 | Inc(Qtotalbytes, Gcbindata); 356 | Inc(Qtotalbytesc, Ibufsize); 357 | // InterlockedIncrement64 358 | Seafind(Pbyte(Pheaders), Pheaderslen, @Creplace[0], 5, @Clen); 359 | Helpers := Inttostrf(Ibufsize); 360 | Clen2 := Length(Helpers); 361 | Clen3 := Pheaderslen + 27 - (5 - Clen2); 362 | Getmem(Headers, Clen3); 363 | Helperp := Pbyte(Headers); 364 | Seamove(Pbyte(Pheaders), Helperp, Clen + 17); 365 | Inc(Helperp, Clen); 366 | Seamove(Pbyte(Helpers), Helperp, Clen2); 367 | Inc(Helperp, Clen2); 368 | Helperp^ := 13; 369 | Inc(Helperp); 370 | Helperp^ := 10; 371 | Inc(Helperp); 372 | Seamove(@Cctdeflate[0], Helperp, 25); 373 | Inc(Helperp, 25); 374 | Clen2 := Pheaderslen - (Clen + 5); 375 | Seamove(Pbyte(Pheaders) + Clen + 5, Helperp, Clen2); 376 | {$IFDEF DEBUGFILE} 377 | Setstring(Debugs, Pansichar(Pbyte(Headers)), Clen3); 378 | Log('Level5 headers:' + #13#10'START>>' + Debugs + '<>' + Debugs + '< 4 then // body one-shot buffering 390 | begin 391 | try 392 | Queryperformancecounter(Qstarttime); 393 | Ibuffer := nil; 394 | Seazlib.Compress(Gbuffer, Gbufsize, Ibuffer, Ibufsize); 395 | Queryperformancecounter(Qendtime); 396 | Inc(Qelapsedtime, Qendtime - Qstarttime); 397 | Inc(Qtotalhits); 398 | Inc(Qtotalbytes, Gbufsize); 399 | Inc(Qtotalbytesc, Ibufsize); 400 | Seafind(Pbyte(Pheaders), Pheaderslen, @Creplace[0], 5, @Clen); 401 | Helpers := Inttostrf(Ibufsize); 402 | Clen2 := Length(Helpers); 403 | Clen3 := Pheaderslen + 27 - (5 - Clen2); 404 | Getmem(Headers, Clen3); 405 | Helperp := Pbyte(Headers); 406 | Seamove(Pbyte(Pheaders), Helperp, Clen + 17); 407 | Inc(Helperp, Clen); 408 | Seamove(Pbyte(Helpers), Helperp, Clen2); 409 | Inc(Helperp, Clen2); 410 | Helperp^ := 13; 411 | Inc(Helperp); 412 | Helperp^ := 10; 413 | Inc(Helperp); 414 | Seamove(@Cctdeflate[0], Helperp, 25); 415 | Inc(Helperp, 25); 416 | Clen2 := Pheaderslen - (Clen + 5); 417 | Seamove(Pbyte(Pheaders) + Clen + 5, Helperp, Clen2); 418 | {$IFDEF DEBUGFILE} 419 | Setstring(Debugs, Pansichar(Pbyte(Headers)), Clen3); 420 | Log('Level5+ headers:' + #13#10 + Debugs); 421 | Setstring(Debugs, Pansichar(Pbyte(Ibuffer)), Ibufsize); 422 | Log('Level5+ body:' + #13#10 + Debugs); 423 | {$ENDIF} 424 | Twriteclient(Pfc^.Writeclient)(Pfc, Headers, @Clen3, 0); 425 | Twriteclient(Pfc^.Writeclient)(Pfc, Ibuffer, @Ibufsize, 0); 426 | finally 427 | Freemem(Headers); 428 | Freemem(Ibuffer); 429 | Freemem(Gbuffer); 430 | end; 431 | end; 432 | end; 433 | 434 | procedure Tthstruct.Treatsendrawdata(Pfc: Phttp_filter_context; Pvnotification: Pointer); 435 | begin 436 | with Thttp_filter_raw_data(Pvnotification^) do 437 | begin 438 | Seacompare(Pvindata, @Chttp1[0], 14, @Clen); // todo: http2 compatibility 439 | if (Clen = 0) then 440 | begin 441 | {$IFDEF DEBUGFILE} 442 | Setstring(Debugs, Pansichar(Pvindata), Cbindata); 443 | Log('Level1:' + #13#10 + 'CbInData:' + Inttostr(Cbindata) + #13#10 + 'cbInBuffer:' + Inttostr(Cbinbuffer) + #13#10 + '-' + 444 | #13#10 + Debugs); 445 | {$ENDIF} 446 | if (Cbindata < 100) or (Cbindata > 99999) then 447 | Exit; // testare 448 | Seafind(Pvindata, Cbindata, @Ccrlf[0], 4, @Clen); 449 | if Clen > -1 then 450 | begin 451 | Seafind(Pvindata, Clen, @Cctext[0], 19, @Clen); 452 | if Clen > -1 then 453 | begin 454 | Pheaders := Pvindata; 455 | Pheaderslen := Cbindata; 456 | Cbindata := 0; 457 | Cbinbuffer := 0; 458 | Pfc^.Pfiltercontext := Pdword(3); 459 | end 460 | else 461 | begin 462 | Seafind(Pvindata, Clen, @Cctext2[0], 22, @Clen); 463 | if Clen > -1 then 464 | begin 465 | Pheaders := Pvindata; 466 | Pheaderslen := Cbindata; 467 | Cbindata := 0; 468 | Cbinbuffer := 0; 469 | Pfc^.Pfiltercontext := Pdword(3); 470 | end 471 | else 472 | begin 473 | Seafind(Pvindata, Clen, @Cctext3[0], 36, @Clen); 474 | if Clen > -1 then 475 | begin 476 | Pheaders := Pvindata; 477 | Pheaderslen := Cbindata; 478 | Cbindata := 0; 479 | Cbinbuffer := 0; 480 | Pfc^.Pfiltercontext := Pdword(3); 481 | end 482 | else 483 | begin 484 | Seafind(Pvindata, Clen, @Cctext4[0], 38, @Clen); 485 | if Clen > -1 then 486 | begin 487 | Pheaders := Pvindata; 488 | Pheaderslen := Cbindata; 489 | Cbindata := 0; 490 | Cbinbuffer := 0; 491 | Pfc^.Pfiltercontext := Pdword(3); 492 | end 493 | else 494 | begin 495 | Seafind(Pvindata, Clen, @Cctext5[0], 29, @Clen); 496 | if Clen > -1 then 497 | begin 498 | Pheaders := Pvindata; 499 | Pheaderslen := Cbindata; 500 | Cbindata := 0; 501 | Cbinbuffer := 0; 502 | Pfc^.Pfiltercontext := Pdword(3); 503 | end; 504 | end; 505 | end; 506 | end; 507 | end; 508 | end; 509 | end 510 | else 511 | begin 512 | if Dword(Pfc.Pfiltercontext) = 3 then 513 | begin 514 | {$IFDEF DEBUGFILE} 515 | Setstring(Debugs, Pansichar(Pvindata), Cbindata); 516 | Log('Level2:' + #13#10 + 'CbInData:' + Inttostr(Cbindata) + #13#10 + 'cbInBuffer:' + Inttostr(Cbinbuffer) + #13#10 + '-' + 517 | #13#10 + Debugs); 518 | {$ENDIF} 519 | Gpvindata := Pvindata; 520 | Gcbindata := Cbindata; 521 | Cbindata := 0; 522 | Cbinbuffer := 0; 523 | Pfc^.Pfiltercontext := Pdword(4); // go stage index 4 524 | end 525 | else 526 | begin 527 | if Dword(Pfc^.Pfiltercontext) = 4 then 528 | begin 529 | Gbufsize := Gcbindata + Cbindata; 530 | Getmem(Gbuffer, Gbufsize); 531 | Seamove(Gpvindata, Gbuffer, Gcbindata); 532 | Seamove(Pvindata, Pbyte(Gbuffer) + Gcbindata, Cbindata); 533 | {$IFDEF DEBUGFILE} 534 | Setstring(Debugs, Pansichar(Pvindata), Cbindata); 535 | Log('Level3:' + #13#10 + 'CbInData:' + Inttostr(Cbindata) + #13#10 + 'cbInBuffer:' + Inttostr(Cbinbuffer) + #13#10 + 536 | 'GcbInData:' + Inttostr(Gcbindata) + #13#10 + 'GBufSize:' + #13#10 + '-' + #13#10 + Debugs); 537 | {$ENDIF} 538 | Cbindata := 0; 539 | Cbinbuffer := 0; 540 | Pfc^.Pfiltercontext := Pdword(5); // go stage index 5 541 | end 542 | else 543 | begin // 5+ 544 | Reallocmem(Gbuffer, Gbufsize + Cbindata); 545 | Seamove(Pvindata, Pbyte(Gbuffer) + Gbufsize, Cbindata); 546 | Inc(Gbufsize, Cbindata); 547 | {$IFDEF DEBUGFILE} 548 | Setstring(Debugs, Pansichar(Pvindata), Cbindata); 549 | Log('Level4+:' + #13#10 + 'CbInData:' + Inttostr(Cbindata) + #13#10 + 'cbInBuffer:' + Inttostr(Cbinbuffer) + #13#10 + 550 | 'GcbInData:' + Inttostr(Gcbindata) + #13#10 + 'GBufSize:' + #13#10 + '-' + #13#10 + Debugs); 551 | {$ENDIF} 552 | Cbindata := 0; 553 | Cbinbuffer := 0; 554 | end; 555 | end; 556 | end; 557 | end; 558 | end; 559 | 560 | procedure Tthstruct.Treatsendresponse(Pfc: Phttp_filter_context; Pvnotification: Pointer); 561 | begin 562 | with Thttp_filter_send_response(Pvnotification^) do 563 | begin 564 | Seazero(@Ibufferts, 256); 565 | Clen := 256; 566 | if not Tgetheader(Getheader)(Pfc, @Ctransfer[0], @Ibufferts, @Clen) then 567 | begin 568 | Seazero(@Ibufferts, 256); 569 | Clen := 256; 570 | if Tgetservervariable(Pfc.Getservervariable)(Pfc, @Caccept[0], @Ibufferts, @Clen) then 571 | begin 572 | Seafind(@Ibufferts, 256, @Cdeflate[0], 7, @Clen); 573 | if Clen > 0 then 574 | begin 575 | Seazero(@Ibufferts, 256); 576 | Clen := 256; 577 | Tgetheader(Getheader)(Pfc, @Ccontent[0], @Ibufferts, @Clen); 578 | Seafind(@Ibufferts, 256, @Cdeflate[0], 7, @Clen); 579 | if Clen = -1 then 580 | begin 581 | Seafind(@Ibufferts, 256, @Cgzip[0], 4, @Clen); 582 | if Clen = -1 then 583 | begin 584 | Seafind(@Ibufferts, 256, @Cxgzip[0], 6, @Clen); 585 | if Clen = -1 then 586 | begin 587 | Tsetheader(Setheader)(Pfc, @Clength[0], @Creplace[0]); 588 | Pfc^.Pfiltercontext := Pdword(3); 589 | end; 590 | end; 591 | end; 592 | end; 593 | end; 594 | end; 595 | end; 596 | end; 597 | 598 | procedure Tthstruct.Treaturlmap(Pfc: Phttp_filter_context; Pvnotification: Pointer); 599 | begin 600 | Pfc^.Pfiltercontext := Pdword(0); 601 | with Thttp_filter_url_map(Pvnotification^) do 602 | begin 603 | Clen := Length(Pszurl); 604 | if Clen > 4 then // #.EXT len 5 605 | begin 606 | Helperp := Pbyte(Pszurl) + Clen; 607 | Seacompare(Helperp - 4, @Caspx[0], 4, @Clen); 608 | if Clen = 0 then 609 | Pfc^.Pfiltercontext := Pdword(1) 610 | else 611 | begin 612 | Seacompare(Helperp - 3, @Cdll[0], 3, @Clen); 613 | if Clen = 0 then 614 | Pfc^.Pfiltercontext := Pdword(1) 615 | else 616 | begin 617 | Seacompare(Helperp - 3, @Cphp[0], 3, @Clen); 618 | if Clen = 0 then 619 | Pfc^.Pfiltercontext := Pdword(1) 620 | else 621 | begin 622 | Seacompare(Helperp - 3, @Caspold[0], 3, @Clen); 623 | if Clen = 0 then 624 | Pfc^.Pfiltercontext := Pdword(1) 625 | else 626 | begin 627 | Seacompare(Helperp - 3, @Cjava[0], 3, @Clen); 628 | if Clen = 0 then 629 | Pfc^.Pfiltercontext := Pdword(1) 630 | end; 631 | end; 632 | end; 633 | end; 634 | end; 635 | end; 636 | end; 637 | 638 | function Httpfilterproc(Pfc: Phttp_filter_context; Notificationtype: Dword; Pvnotification: Lpvoid): Dword; export; stdcall; 639 | begin 640 | Result := Sf_status_req_next_notification; 641 | try 642 | case Notificationtype of 643 | Sf_notify_url_map: 644 | begin 645 | if not Thinit then // eventually use entrypoint DLL_THREAD_ATTACH 646 | Thwork := Tthstruct.Create; 647 | Thwork.Treaturlmap(Pfc, Pvnotification); 648 | end; 649 | Sf_notify_send_response: 650 | if Dword(Pfc^.Pfiltercontext) = 1 then 651 | begin 652 | if not Thinit then 653 | Thwork := Tthstruct.Create; 654 | Thwork.Treatsendresponse(Pfc, Pvnotification); 655 | end; 656 | Sf_notify_send_raw_data: 657 | if Dword(Pfc^.Pfiltercontext) > 1 then 658 | begin 659 | if not Thinit then 660 | Thwork := Tthstruct.Create; 661 | Thwork.Treatsendrawdata(Pfc, Pvnotification); 662 | end; 663 | Sf_notify_end_of_request: 664 | if Dword(Pfc^.Pfiltercontext) > 3 then 665 | begin 666 | if not Thinit then 667 | Thwork := Tthstruct.Create; 668 | Thwork.Treatendofrequest(Pfc); 669 | end; 670 | end; 671 | except 672 | on E: Exception do 673 | begin 674 | Result := Sf_status_req_next_notification; 675 | // Log('Exception: ' + E.Message + #13#10 + 'StackTrace:' + #13#10 + E.StackTrace); 676 | end; 677 | end; 678 | end; 679 | 680 | function Getfilterversion(Pver: Phttp_filter_version): Bool; export; stdcall; 681 | begin 682 | Pver^.Lpszfilterdesc := 'Roberto Della Pasqua 1974 - www.dellapasqua.com - Parallel SIMD Deflate 2.02 - 03 Sept 2017'; 683 | Pver^.Dwfilterversion := Makelong(Hse_version_minor, Hse_version_major); 684 | Pver^.Dwflags := Sf_notify_order_low or Sf_notify_url_map or Sf_notify_send_raw_data or Sf_notify_send_response or 685 | Sf_notify_end_of_request; 686 | Result := True; 687 | end; 688 | 689 | function Terminatefilter(Dwflags: Dword): Bool; export; stdcall; 690 | begin 691 | Result := True; 692 | end; 693 | 694 | procedure Dllentrypoint(Reason: Dword); 695 | // detach free struct 696 | begin 697 | if Reason = Dll_thread_detach then 698 | begin 699 | if Thinit then 700 | begin 701 | Freeandnil(Thwork); 702 | Thinit := False; 703 | end; 704 | end; 705 | end; 706 | 707 | exports Getfilterversion, Httpfilterproc, Terminatefilter; 708 | 709 | begin 710 | Ismultithread := False; // avoid thread contention in new MM 711 | Dllproc := @Dllentrypoint; 712 | 713 | end. 714 | -------------------------------------------------------------------------------- /SeaIISFilter/SeaIISFilter.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {C1EBD7D5-DD13-44CC-8D3F-7FBA53905616} 4 | SeaIISFilter.dpr 5 | True 6 | Release 7 | 3 8 | Library 9 | None 10 | 18.8 11 | Win64 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | true 44 | Cfg_2 45 | true 46 | true 47 | 48 | 49 | false 50 | false 51 | false 52 | false 53 | false 54 | 00400000 55 | true 56 | SeaIISFilter 57 | 1040 58 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName= 59 | System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) 60 | C:\inetpub\isapi\ 61 | 62 | 63 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 64 | Debug 65 | true 66 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) 67 | 1033 68 | 69 | 70 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 71 | Debug 72 | true 73 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 74 | 1033 75 | (None) 76 | 77 | 78 | RELEASE;$(DCC_Define) 79 | 0 80 | false 81 | 0 82 | 83 | 84 | c:\Exes 85 | 1033 86 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 87 | C:\Windows\System32\inetsrv\w3wp.exe 88 | -debug 89 | true 90 | 91 | 92 | DEBUG;$(DCC_Define) 93 | false 94 | true 95 | 96 | 97 | c:\Exes 98 | true 99 | 1033 100 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 101 | C:\Windows\System32\inetsrv\w3wp.exe 102 | -debug 103 | C:\exes 104 | true 105 | false 106 | 107 | 108 | 109 | MainSource 110 | 111 | 112 | 113 | Cfg_2 114 | Base 115 | 116 | 117 | Base 118 | 119 | 120 | Cfg_1 121 | Base 122 | 123 | 124 | 125 | Delphi.Personality.12 126 | 127 | 128 | 129 | 130 | SeaIISFilter.dpr 131 | 132 | 133 | Microsoft Office 2000 Sample Automation Server Wrapper Components 134 | Microsoft Office XP Sample Automation Server Wrapper Components 135 | 136 | 137 | 138 | False 139 | True 140 | True 141 | 142 | 143 | 144 | 145 | true 146 | 147 | 148 | 149 | 150 | SeaIISFilter.dll 151 | true 152 | 153 | 154 | 155 | 156 | true 157 | 158 | 159 | 160 | 161 | true 162 | 163 | 164 | 165 | 166 | true 167 | 168 | 169 | 170 | 171 | true 172 | 173 | 174 | 175 | 176 | true 177 | 178 | 179 | 180 | 181 | SeaIISFilter.dll 182 | true 183 | 184 | 185 | 186 | 187 | 1 188 | 189 | 190 | 0 191 | 192 | 193 | 194 | 195 | classes 196 | 1 197 | 198 | 199 | classes 200 | 1 201 | 202 | 203 | 204 | 205 | res\xml 206 | 1 207 | 208 | 209 | res\xml 210 | 1 211 | 212 | 213 | 214 | 215 | library\lib\armeabi-v7a 216 | 1 217 | 218 | 219 | 220 | 221 | library\lib\armeabi 222 | 1 223 | 224 | 225 | library\lib\armeabi 226 | 1 227 | 228 | 229 | 230 | 231 | library\lib\armeabi-v7a 232 | 1 233 | 234 | 235 | 236 | 237 | library\lib\mips 238 | 1 239 | 240 | 241 | library\lib\mips 242 | 1 243 | 244 | 245 | 246 | 247 | library\lib\armeabi-v7a 248 | 1 249 | 250 | 251 | library\lib\arm64-v8a 252 | 1 253 | 254 | 255 | 256 | 257 | library\lib\armeabi-v7a 258 | 1 259 | 260 | 261 | 262 | 263 | res\drawable 264 | 1 265 | 266 | 267 | res\drawable 268 | 1 269 | 270 | 271 | 272 | 273 | res\values 274 | 1 275 | 276 | 277 | res\values 278 | 1 279 | 280 | 281 | 282 | 283 | res\values-v21 284 | 1 285 | 286 | 287 | res\values-v21 288 | 1 289 | 290 | 291 | 292 | 293 | res\values 294 | 1 295 | 296 | 297 | res\values 298 | 1 299 | 300 | 301 | 302 | 303 | res\drawable 304 | 1 305 | 306 | 307 | res\drawable 308 | 1 309 | 310 | 311 | 312 | 313 | res\drawable-xxhdpi 314 | 1 315 | 316 | 317 | res\drawable-xxhdpi 318 | 1 319 | 320 | 321 | 322 | 323 | res\drawable-ldpi 324 | 1 325 | 326 | 327 | res\drawable-ldpi 328 | 1 329 | 330 | 331 | 332 | 333 | res\drawable-mdpi 334 | 1 335 | 336 | 337 | res\drawable-mdpi 338 | 1 339 | 340 | 341 | 342 | 343 | res\drawable-hdpi 344 | 1 345 | 346 | 347 | res\drawable-hdpi 348 | 1 349 | 350 | 351 | 352 | 353 | res\drawable-xhdpi 354 | 1 355 | 356 | 357 | res\drawable-xhdpi 358 | 1 359 | 360 | 361 | 362 | 363 | res\drawable-mdpi 364 | 1 365 | 366 | 367 | res\drawable-mdpi 368 | 1 369 | 370 | 371 | 372 | 373 | res\drawable-hdpi 374 | 1 375 | 376 | 377 | res\drawable-hdpi 378 | 1 379 | 380 | 381 | 382 | 383 | res\drawable-xhdpi 384 | 1 385 | 386 | 387 | res\drawable-xhdpi 388 | 1 389 | 390 | 391 | 392 | 393 | res\drawable-xxhdpi 394 | 1 395 | 396 | 397 | res\drawable-xxhdpi 398 | 1 399 | 400 | 401 | 402 | 403 | res\drawable-xxxhdpi 404 | 1 405 | 406 | 407 | res\drawable-xxxhdpi 408 | 1 409 | 410 | 411 | 412 | 413 | res\drawable-small 414 | 1 415 | 416 | 417 | res\drawable-small 418 | 1 419 | 420 | 421 | 422 | 423 | res\drawable-normal 424 | 1 425 | 426 | 427 | res\drawable-normal 428 | 1 429 | 430 | 431 | 432 | 433 | res\drawable-large 434 | 1 435 | 436 | 437 | res\drawable-large 438 | 1 439 | 440 | 441 | 442 | 443 | res\drawable-xlarge 444 | 1 445 | 446 | 447 | res\drawable-xlarge 448 | 1 449 | 450 | 451 | 452 | 453 | res\values 454 | 1 455 | 456 | 457 | res\values 458 | 1 459 | 460 | 461 | 462 | 463 | 1 464 | 465 | 466 | 1 467 | 468 | 469 | 0 470 | 471 | 472 | 473 | 474 | 1 475 | .framework 476 | 477 | 478 | 1 479 | .framework 480 | 481 | 482 | 0 483 | 484 | 485 | 486 | 487 | 1 488 | .dylib 489 | 490 | 491 | 1 492 | .dylib 493 | 494 | 495 | 0 496 | .dll;.bpl 497 | 498 | 499 | 500 | 501 | 1 502 | .dylib 503 | 504 | 505 | 1 506 | .dylib 507 | 508 | 509 | 1 510 | .dylib 511 | 512 | 513 | 1 514 | .dylib 515 | 516 | 517 | 1 518 | .dylib 519 | 520 | 521 | 0 522 | .bpl 523 | 524 | 525 | 526 | 527 | 0 528 | 529 | 530 | 0 531 | 532 | 533 | 0 534 | 535 | 536 | 0 537 | 538 | 539 | 0 540 | 541 | 542 | 0 543 | 544 | 545 | 0 546 | 547 | 548 | 0 549 | 550 | 551 | 552 | 553 | 1 554 | 555 | 556 | 1 557 | 558 | 559 | 1 560 | 561 | 562 | 563 | 564 | 1 565 | 566 | 567 | 1 568 | 569 | 570 | 1 571 | 572 | 573 | 574 | 575 | 1 576 | 577 | 578 | 1 579 | 580 | 581 | 1 582 | 583 | 584 | 585 | 586 | 1 587 | 588 | 589 | 1 590 | 591 | 592 | 1 593 | 594 | 595 | 596 | 597 | 1 598 | 599 | 600 | 1 601 | 602 | 603 | 1 604 | 605 | 606 | 607 | 608 | 1 609 | 610 | 611 | 1 612 | 613 | 614 | 1 615 | 616 | 617 | 618 | 619 | 1 620 | 621 | 622 | 1 623 | 624 | 625 | 1 626 | 627 | 628 | 629 | 630 | 1 631 | 632 | 633 | 1 634 | 635 | 636 | 1 637 | 638 | 639 | 640 | 641 | 1 642 | 643 | 644 | 1 645 | 646 | 647 | 1 648 | 649 | 650 | 651 | 652 | 1 653 | 654 | 655 | 1 656 | 657 | 658 | 1 659 | 660 | 661 | 662 | 663 | 1 664 | 665 | 666 | 1 667 | 668 | 669 | 1 670 | 671 | 672 | 673 | 674 | 1 675 | 676 | 677 | 1 678 | 679 | 680 | 1 681 | 682 | 683 | 684 | 685 | 1 686 | 687 | 688 | 1 689 | 690 | 691 | 1 692 | 693 | 694 | 695 | 696 | 1 697 | 698 | 699 | 1 700 | 701 | 702 | 1 703 | 704 | 705 | 706 | 707 | 1 708 | 709 | 710 | 1 711 | 712 | 713 | 1 714 | 715 | 716 | 717 | 718 | 1 719 | 720 | 721 | 1 722 | 723 | 724 | 1 725 | 726 | 727 | 728 | 729 | 1 730 | 731 | 732 | 1 733 | 734 | 735 | 1 736 | 737 | 738 | 739 | 740 | 1 741 | 742 | 743 | 1 744 | 745 | 746 | 1 747 | 748 | 749 | 750 | 751 | 1 752 | 753 | 754 | 1 755 | 756 | 757 | 1 758 | 759 | 760 | 761 | 762 | 1 763 | 764 | 765 | 1 766 | 767 | 768 | 1 769 | 770 | 771 | 772 | 773 | 1 774 | 775 | 776 | 1 777 | 778 | 779 | 1 780 | 781 | 782 | 783 | 784 | 1 785 | 786 | 787 | 1 788 | 789 | 790 | 1 791 | 792 | 793 | 794 | 795 | 1 796 | 797 | 798 | 1 799 | 800 | 801 | 1 802 | 803 | 804 | 805 | 806 | 1 807 | 808 | 809 | 1 810 | 811 | 812 | 1 813 | 814 | 815 | 816 | 817 | 1 818 | 819 | 820 | 1 821 | 822 | 823 | 1 824 | 825 | 826 | 827 | 828 | 1 829 | 830 | 831 | 1 832 | 833 | 834 | 1 835 | 836 | 837 | 838 | 839 | 1 840 | 841 | 842 | 1 843 | 844 | 845 | 1 846 | 847 | 848 | 849 | 850 | 1 851 | 852 | 853 | 1 854 | 855 | 856 | 1 857 | 858 | 859 | 860 | 861 | 1 862 | 863 | 864 | 1 865 | 866 | 867 | 868 | 869 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 870 | 1 871 | 872 | 873 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 874 | 1 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 1 883 | 884 | 885 | 1 886 | 887 | 888 | 1 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | Contents\Resources 897 | 1 898 | 899 | 900 | Contents\Resources 901 | 1 902 | 903 | 904 | 905 | 906 | library\lib\armeabi-v7a 907 | 1 908 | 909 | 910 | library\lib\arm64-v8a 911 | 1 912 | 913 | 914 | 1 915 | 916 | 917 | 1 918 | 919 | 920 | 1 921 | 922 | 923 | 1 924 | 925 | 926 | 1 927 | 928 | 929 | 1 930 | 931 | 932 | 0 933 | 934 | 935 | 936 | 937 | library\lib\armeabi-v7a 938 | 1 939 | 940 | 941 | 942 | 943 | 1 944 | 945 | 946 | 1 947 | 948 | 949 | 950 | 951 | Assets 952 | 1 953 | 954 | 955 | Assets 956 | 1 957 | 958 | 959 | 960 | 961 | Assets 962 | 1 963 | 964 | 965 | Assets 966 | 1 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | False 981 | 982 | 12 983 | 984 | 985 | 986 | 987 | 988 | -------------------------------------------------------------------------------- /SeaIISFilter/SeaIISFilter.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 2017/08/20 00:17:38.000.078,C:\RDPIIS\SHUTTLE -VER7.dproj=C:\RDPIIS\SHUTTLE.dproj 5 | 2017/09/01 15:47:37.000.188,=C:\RDPIIS\ModelSupport_SHUTTLE\default.txaPackage 6 | 2017/09/15 21:42:33.000.024,=C:\Users\Administrator\Desktop\RDPIIS\Unit1.pas 7 | 2017/09/15 21:42:43.000.071,C:\Users\Administrator\Desktop\RDPIIS\Unit1.pas=C:\Users\Administrator\Desktop\RDPIIS\Clock.pas 8 | 2018/06/19 15:54:41.000.211,=C:\Users\Administrator\Desktop\RDPIIS\Unit1.pas 9 | 2018/06/19 15:55:13.000.346,C:\Users\Administrator\Desktop\RDPIIS\RDPUse.pas=C:\Users\Administrator\Desktop\RDPIIS\Unit1.pas 10 | 2018/06/20 17:45:54.000.232,C:\Users\ROBERTO\Desktop\RDPIIS\SEA.dproj=C:\Users\ROBERTO\Desktop\RDPIIS\SHUTTLE.dproj 11 | 2019/06/14 13:19:45.000.280,C:\Users\rober\OneDrive\Documents\Progetti\IntelMM\IISIsapi\SEA.dproj=C:\Users\rober\OneDrive\Documents\Progetti\IntelMM\IISIsapi\SeaIISFilter.dproj 12 | 13 | 14 | -------------------------------------------------------------------------------- /SeaIISFilter/SeaIISFilter.identcache: -------------------------------------------------------------------------------- 1 | -C:\Libs\IntelMM\SeaIISFilter\SeaIISFilter.dpr -------------------------------------------------------------------------------- /SeaIISFilter/SeaIISFilter.stat: -------------------------------------------------------------------------------- 1 | [Stats] 2 | EditorSecs=669 3 | DesignerSecs=1 4 | InspectorSecs=1 5 | CompileSecs=1 6 | OtherSecs=1 7 | StartTime=15/06/2019 22:22:01 8 | RealKeys=0 9 | EffectiveKeys=0 10 | DebugSecs=1 11 | -------------------------------------------------------------------------------- /SeaMM.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/SeaMM.dll -------------------------------------------------------------------------------- /SeaMM_static.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/SeaMM_static.dll -------------------------------------------------------------------------------- /SeaQPar.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/SeaQPar.dll -------------------------------------------------------------------------------- /SeaRTL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/SeaRTL.dll -------------------------------------------------------------------------------- /SeaZIP.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/SeaZIP.dll -------------------------------------------------------------------------------- /TestQueue/TestQ.dpr: -------------------------------------------------------------------------------- 1 | program TestQ; 2 | 3 | uses 4 | RDPMM64, 5 | RDPQueue64, 6 | Vcl.Forms, 7 | UnitQ in 'UnitQ.pas' {FormQ}; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TFormQ, FormQ); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /TestQueue/TestQ.dproj.local: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 2025/03/31 18:45:39.000.489,=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\WebModuleUnit1.pas 5 | 2025/04/08 18:52:02.000.102,=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit2.pas 6 | 2025/04/13 15:03:58.000.472,=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit2.pas 7 | 2025/04/13 15:04:29.000.860,C:\Users\rober\OneDrive\DelphiProjects\TestQueue\UnitQ.dfm=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit2.dfm 8 | 2025/04/13 15:04:29.000.860,C:\Users\rober\OneDrive\DelphiProjects\TestQueue\UnitQ.pas=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Unit2.pas 9 | 2025/04/13 15:04:33.000.318,C:\Users\rober\OneDrive\DelphiProjects\TestQueue\TestQ.dproj=C:\Users\rober\OneDrive\Documents\Embarcadero\Studio\Projects\Project2.dproj 10 | 2025/04/13 15:12:50.000.954,=C:\Users\rober\OneDrive\DelphiProjects\TestQueue\Unit1.pas 11 | 2025/04/13 15:15:24.000.502,C:\Users\rober\OneDrive\DelphiProjects\TestQueue\RDPQueue64.pas=C:\Users\rober\OneDrive\DelphiProjects\TestQueue\Unit1.pas 12 | 13 | 14 | -------------------------------------------------------------------------------- /TestQueue/TestQ.identcache: -------------------------------------------------------------------------------- 1 | :C:\Users\rober\OneDrive\DelphiProjects\TestQueue\TestQ.dpr:C:\Users\rober\OneDrive\DelphiProjects\TestQueue\UnitQ.pas -------------------------------------------------------------------------------- /TestQueue/TestQ.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RDP1974/Delphi64RTL/1762e67b787ca3c5d78362c97bc2210a94c56b4f/TestQueue/TestQ.res -------------------------------------------------------------------------------- /TestQueue/UnitQ.dfm: -------------------------------------------------------------------------------- 1 | object FormQ: TFormQ 2 | Left = 0 3 | Top = 0 4 | Caption = 'FormQ' 5 | ClientHeight = 441 6 | ClientWidth = 624 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -12 11 | Font.Name = 'Segoe UI' 12 | Font.Style = [] 13 | TextHeight = 15 14 | object btn_testQ: TButton 15 | Left = 48 16 | Top = 40 17 | Width = 113 18 | Height = 73 19 | Caption = 'Test Q' 20 | TabOrder = 0 21 | OnClick = btn_testQClick 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /TestQueue/UnitQ.pas: -------------------------------------------------------------------------------- 1 | unit UnitQ; 2 | // Roberto Della Pasqua www.dellapasqua.com 3 | // 14 apr 2025 thread safe concurrent queue from Intel One Api v2022.1 4 | // little test with strings 5 | 6 | interface 7 | 8 | uses 9 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 10 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; 11 | 12 | type 13 | TFormQ = class(TForm) 14 | btn_testQ: TButton; 15 | procedure btn_testQClick(Sender: TObject); 16 | private 17 | { Private declarations } 18 | public 19 | { Public declarations } 20 | end; 21 | 22 | var 23 | FormQ: TFormQ; 24 | 25 | implementation 26 | 27 | {$R *.dfm} 28 | 29 | uses RDPQueue64; 30 | 31 | procedure TFormQ.btn_testQClick(Sender: TObject); 32 | var 33 | Queue: pointer; 34 | S: PString; 35 | A,B: integer; 36 | begin 37 | Queue := CreateQueue; 38 | B:=GetTickCount64; 39 | for A := 0 to 1000000 do 40 | begin 41 | New(S); 42 | S^ := 'BOB THREAD '+ A.ToString; 43 | PushToQueue(Queue, S); 44 | end; 45 | for A := 0 to 1000000 do 46 | if PopFromQueue(Queue, @S) then 47 | begin 48 | // ShowMessage(S^); 49 | Dispose(S); 50 | end; 51 | ShowMessage('Done: ' + (GetTickCount64-B).ToString); 52 | FreeQueue(Queue); 53 | end; 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | Intel Integrated Performance Primitives and Threading Building Block for Delphi 64bit compiler: speed up, parallelization and reliability 2 | On modern CPU generation I9, a typical webbroker, soap, multithreaded server apps, massively using the heap, can have a benefit over 1000% 3 | Please contact me roberto dot dellapasqua at live dot com if interested 4 | Thank you and best regards 5 | -------------------------------------------------------------------------------- /third-party-programs.txt: -------------------------------------------------------------------------------- 1 | There are not any Third Party Programs. --------------------------------------------------------------------------------