├── 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.dpr VC:\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 |
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.dpr QC:\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 |