Compare commits

...

9 Commits
069 ... main

Author SHA1 Message Date
Razor12911 9a1d5fafcf
0.7.9 hotfix 1 2023-09-18 02:43:52 +02:00
Razor12911 9d6a2d6e20
0.7.9 hotfix 1 2023-09-18 02:42:53 +02:00
Razor12911 16199e4908
0.7.9 hotfix 1 2023-09-18 02:42:01 +02:00
Razor12911 83e41efb88
0.7.9 hotfix 1 2023-09-14 23:04:54 +02:00
Razor12911 fde22c2c77 update to 0.7.9 2023-09-10 15:03:26 +02:00
Razor12911 30ce6f00fc update to 0.7.3 2023-06-30 05:02:05 +02:00
Razor12911 7e8bbfcd86 Merge branch 'main' of https://github.com/Razor12911/xtool 2023-06-12 16:28:12 +02:00
Razor12911 3b0bf1fe47 update to 0.7.2 2023-06-12 16:28:02 +02:00
Razor12911 6fbb1865e8
Delete README.md 2023-05-12 22:35:15 +02:00
233 changed files with 49645 additions and 49290 deletions

View File

@ -4,9 +4,13 @@ interface
uses
Utils, LibImport,
System.SysUtils;
WinAPI.Windows,
System.SysUtils, System.Classes, System.Types, System.StrUtils;
const
PLUGIN_DATABASE = 0;
PLUGIN_CONFIG = 1;
PLUGIN_LIBRARY = 2;
PluginsParam = '-bd';
type
@ -44,7 +48,10 @@ implementation
procedure Init;
begin
UILib := TLibImport.Create(ChangeFileExt(Utils.GetModuleName, 'ui.dll'));
if Win32MajorVersion < 6 then
exit;
UILib := TLibImport.Create;
UILib.LoadLib(ChangeFileExt(Utils.GetModuleName, 'ui.dll'));
if UILib.Loaded then
begin
@XTLUI1 := UILib.GetProcAddr('XTLUI1');
@ -57,6 +64,8 @@ end;
procedure Deinit;
begin
if Win32MajorVersion < 6 then
exit;
UILib.Free;
end;
@ -65,35 +74,37 @@ var
initialization
IsLibrary := ExtractFileName(Utils.GetModuleName) <>
ExtractFileName(ParamStr(0));
if IsLibrary then
exit;
for I := 1 to ParamCount do
if not IsLibrary then
begin
if (ParamStr(I) = '--debug') then
for I := 1 to ParamCount do
begin
DEBUG := True;
break;
if (ParamStr(I) = '--debug') then
begin
DEBUG := True;
break;
end;
end;
end;
Init;
if UIDLLLoaded and (ParamCount = 0) then
PluginsPath := IncludeTrailingBackSlash
(ExpandPath(GetIniString('UI', 'Plugins', '',
ChangeFileExt(Utils.GetModuleName, 'ui.ini'))));
for I := 1 to ParamCount do
begin
if ParamStr(I).StartsWith(PluginsParam) then
Init;
if UIDLLLoaded and (ParamCount = 0) then
PluginsPath := IncludeTrailingBackSlash
(ExpandPath(GetIniString('UI', 'Plugins', '',
ChangeFileExt(Utils.GetModuleName, 'ui.ini'))));
for I := 1 to ParamCount do
begin
PluginsPath := ParamStr(I).Substring(PluginsParam.Length);
break;
if ParamStr(I).StartsWith(PluginsParam) then
begin
PluginsPath := ParamStr(I).Substring(PluginsParam.Length);
break;
end;
end;
end;
PluginsPath := IncludeTrailingBackSlash(ExpandPath(PluginsPath));
if not DirectoryExists(ExpandPath(PluginsPath, True)) then
PluginsPath := ExtractFilePath(Utils.GetModuleName);
finalization
Deinit;
if not IsLibrary then
Deinit;
end.

View File

@ -1 +0,0 @@
# xtool

487
Unit1.fmx
View File

@ -3430,6 +3430,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit1Change
object SearchEditButton1: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -3589,7 +3590,7 @@ object Form1: TForm1
Size.Width = 110.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
TabOrder = 2
Text = 'Skip verification'
end
object CheckBox6: TCheckBox
@ -3615,9 +3616,46 @@ object Form1: TForm1
Size.Width = 110.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 4
TabOrder = 5
Text = 'Low memory'
end
object Label8: TLabel
Align = Left
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Position.X = 362.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
Text = 'Cache'
TabOrder = 1
end
object ComboEdit3: TComboEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Left
TabOrder = 4
ItemHeight = 19.000000000000000000
Items.Strings = (
'0MB'
'512MB'
'1GB'
'2GB'
'4GB'
'75%'
'90%')
ItemIndex = 1
Text = '512MB'
Position.X = 450.000000000000000000
Position.Y = 8.000000000000000000
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
end
end
end
object GroupBox3: TGroupBox
@ -3872,6 +3910,7 @@ object Form1: TForm1
ItemHeight = 19.000000000000000000
Items.Strings = (
'Auto'
'Auto+'
'16MB'
'32MB'
'64MB'
@ -4015,6 +4054,7 @@ object Form1: TForm1
TabOrder = 2
object Button1: TButton
Align = Right
Enabled = False
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
@ -4085,190 +4125,12 @@ object Form1: TForm1
592s
442s
592s
442s
592s
442s
592s
442s)
object TabItem8: TTabItem
CustomIcon = <
item
end>
IsSelected = True
Size.Width = 60.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
StyleLookup = ''
TabOrder = 0
Text = 'Archive'
ExplicitSize.cx = 60.000000000000000000
ExplicitSize.cy = 22.000000000000000000
object Layout19: TLayout
Align = Bottom
Margins.Bottom = 8.000000000000000000
Position.Y = 412.000000000000000000
Size.Width = 592.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
object Button6: TButton
Align = Right
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
Position.X = 496.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Text = 'Start'
OnClick = Button6Click
end
end
object VertScrollBox3: TVertScrollBox
Align = Client
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 576.000000000000000000
Size.Height = 396.000000000000000000
Size.PlatformDefault = False
TabOrder = 5
Viewport.Width = 576.000000000000000000
Viewport.Height = 396.000000000000000000
object GroupBox13: TGroupBox
Align = Top
Margins.Left = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 337.000000000000000000
Size.PlatformDefault = False
Text = 'Files'
TabOrder = 6
object Layout15: TLayout
Align = Client
Margins.Top = 16.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 285.000000000000000000
Size.PlatformDefault = False
TabOrder = 15
object Memo1: TMemo
Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
DataDetectorTypes = []
Align = Client
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Size.Width = 544.000000000000000000
Size.Height = 277.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Viewport.Width = 540.000000000000000000
Viewport.Height = 273.000000000000000000
end
end
object Layout17: TLayout
Align = Bottom
Position.Y = 301.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
object Button3: TButton
Align = Right
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Position.X = 384.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
Text = 'Add file'
OnClick = Button3Click
end
object Button4: TButton
Align = Right
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Position.X = 472.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Text = 'Add folder'
OnClick = Button4Click
end
object Label11: TLabel
Align = Left
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 225.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
Text = 'Wildcards can be used.'
TabOrder = 2
end
end
end
object GroupBox14: TGroupBox
Align = Top
Margins.Left = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 337.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 54.000000000000000000
Size.PlatformDefault = False
Text = 'Output'
TabOrder = 0
object Layout16: TLayout
Align = Top
Margins.Top = 16.000000000000000000
Position.Y = 16.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
object Edit11: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Client
TabOrder = 0
ReadOnly = True
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 544.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
object SearchEditButton10: TSearchEditButton
CanFocus = False
Cursor = crArrow
Size.Width = 28.000000000000000000
Size.Height = 14.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
OnClick = SearchEditButton10Click
end
end
end
end
end
end
object TabItem9: TTabItem
CustomIcon = <
item
end>
IsSelected = False
IsSelected = True
Size.Width = 70.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
@ -4319,6 +4181,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit21Change
object SearchEditButton20: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -4379,6 +4242,7 @@ object Form1: TForm1
Size.Width = 544.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit21Change
object SearchEditButton21: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -4506,6 +4370,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit21Change
object SearchEditButton22: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -4565,6 +4430,7 @@ object Form1: TForm1
Size.Width = 544.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChangeTracking = Edit21Change
end
end
end
@ -4579,6 +4445,7 @@ object Form1: TForm1
TabOrder = 2
object Button10: TButton
Align = Right
Enabled = False
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
@ -4647,6 +4514,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit8Change
object SearchEditButton7: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -4851,6 +4719,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit8Change
object SearchEditButton6: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -4891,6 +4760,7 @@ object Form1: TForm1
TabOrder = 2
object Button5: TButton
Align = Right
Enabled = False
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
@ -4959,6 +4829,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit10Change
object SearchEditButton9: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -5163,6 +5034,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit10Change
object SearchEditButton12: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -5203,6 +5075,7 @@ object Form1: TForm1
TabOrder = 2
object Button7: TButton
Align = Right
Enabled = False
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
@ -5271,6 +5144,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit14Change
object SearchEditButton13: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -5475,6 +5349,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit14Change
object SearchEditButton15: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -5535,6 +5410,7 @@ object Form1: TForm1
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit14Change
object SearchEditButton16: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -5575,6 +5451,7 @@ object Form1: TForm1
TabOrder = 2
object Button8: TButton
Align = Right
Enabled = False
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
@ -5588,252 +5465,6 @@ object Form1: TForm1
end
end
end
object TabItem7: TTabItem
CustomIcon = <
item
end>
IsSelected = False
Size.Width = 49.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
StyleLookup = ''
TabOrder = 0
Text = 'Patch'
ExplicitSize.cx = 49.000000000000000000
ExplicitSize.cy = 22.000000000000000000
object VertScrollBox6: TVertScrollBox
Align = Client
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 576.000000000000000000
Size.Height = 396.000000000000000000
Size.PlatformDefault = False
TabOrder = 5
Viewport.Width = 576.000000000000000000
Viewport.Height = 396.000000000000000000
object GroupBox24: TGroupBox
Align = Top
Margins.Left = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 54.000000000000000000
Size.PlatformDefault = False
Text = 'Input'
TabOrder = 5
object Layout31: TLayout
Align = Top
Margins.Top = 16.000000000000000000
Position.Y = 16.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
object Edit18: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Client
TabOrder = 0
ReadOnly = True
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 456.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
object SearchEditButton17: TSearchEditButton
CanFocus = False
Cursor = crArrow
Size.Width = 28.000000000000000000
Size.Height = 14.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
OnClick = SearchEditButton17Click
end
end
object ComboBox16: TComboBox
Align = Left
Items.Strings = (
'File'
'Directory')
ItemIndex = 0
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
OnChange = ComboBox16Change
end
end
end
object GroupBox25: TGroupBox
Align = Top
Margins.Left = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 108.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 54.000000000000000000
Size.PlatformDefault = False
Text = 'Output'
TabOrder = 0
object Layout32: TLayout
Align = Top
Margins.Top = 16.000000000000000000
Position.Y = 16.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
object Edit19: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Client
TabOrder = 0
ReadOnly = True
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 544.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
object SearchEditButton18: TSearchEditButton
CanFocus = False
Cursor = crArrow
Size.Width = 28.000000000000000000
Size.Height = 14.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
OnClick = SearchEditButton18Click
end
end
end
end
object GroupBox26: TGroupBox
Align = Top
Margins.Left = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 162.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 54.000000000000000000
Size.PlatformDefault = False
Text = 'Options'
TabOrder = 2
object Layout33: TLayout
Align = Top
Margins.Top = 16.000000000000000000
Position.Y = 16.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
object Label17: TLabel
Align = Left
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
Text = 'Threads'
TabOrder = 0
end
object SpinBox14: TSpinBox
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Left
TabOrder = 1
Cursor = crIBeam
DecimalDigits = 0
Min = 1.000000000000000000
Max = 1.000000000000000000
Value = 1.000000000000000000
Position.X = 96.000000000000000000
Position.Y = 8.000000000000000000
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
end
end
end
object GroupBox27: TGroupBox
Align = Top
Margins.Left = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 54.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 54.000000000000000000
Size.PlatformDefault = False
Text = 'Source'
TabOrder = 8
object Layout34: TLayout
Align = Top
Margins.Top = 16.000000000000000000
Position.Y = 16.000000000000000000
Size.Width = 560.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
object Edit20: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Client
TabOrder = 0
ReadOnly = True
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 544.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
object SearchEditButton19: TSearchEditButton
CanFocus = False
Cursor = crArrow
Size.Width = 28.000000000000000000
Size.Height = 14.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
OnClick = SearchEditButton19Click
end
end
end
end
end
object Layout35: TLayout
Align = Bottom
Margins.Bottom = 8.000000000000000000
Position.Y = 412.000000000000000000
Size.Width = 592.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 2
object Button9: TButton
Align = Right
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000
Position.X = 496.000000000000000000
Size.Width = 80.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Text = 'Start'
OnClick = Button9Click
end
end
end
end
end
object TabItem3: TTabItem
@ -5891,6 +5522,7 @@ object Form1: TForm1
Size.Width = 544.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
OnChange = Edit25Change
object SearchEditButton23: TSearchEditButton
CanFocus = False
Cursor = crArrow
@ -6099,6 +5731,7 @@ object Form1: TForm1
TabOrder = 2
object Button11: TButton
Align = Right
Enabled = False
ModalResult = 1
Margins.Left = 8.000000000000000000
Margins.Right = 16.000000000000000000

199
Unit1.pas
View File

@ -86,20 +86,7 @@ type
TabItem4: TTabItem;
TabItem5: TTabItem;
TabItem6: TTabItem;
TabItem7: TTabItem;
TabItem8: TTabItem;
GroupBox13: TGroupBox;
Layout15: TLayout;
GroupBox14: TGroupBox;
Layout16: TLayout;
Edit11: TEdit;
SearchEditButton10: TSearchEditButton;
Memo1: TMemo;
Layout17: TLayout;
Button3: TButton;
Button4: TButton;
OpenDialog2: TOpenDialog;
Label11: TLabel;
Layout4: TLayout;
Button1: TButton;
Label5: TLabel;
@ -107,9 +94,6 @@ type
SearchEditButton5: TSearchEditButton;
Layout18: TLayout;
Button5: TButton;
Layout19: TLayout;
Button6: TButton;
VertScrollBox3: TVertScrollBox;
TabItem9: TTabItem;
VertScrollBox4: TVertScrollBox;
GroupBox15: TGroupBox;
@ -164,26 +148,6 @@ type
Edit17: TEdit;
SearchEditButton16: TSearchEditButton;
ComboBox15: TComboBox;
VertScrollBox6: TVertScrollBox;
GroupBox24: TGroupBox;
Layout31: TLayout;
Edit18: TEdit;
SearchEditButton17: TSearchEditButton;
ComboBox16: TComboBox;
GroupBox25: TGroupBox;
Layout32: TLayout;
Edit19: TEdit;
SearchEditButton18: TSearchEditButton;
GroupBox26: TGroupBox;
Layout33: TLayout;
Label17: TLabel;
SpinBox14: TSpinBox;
GroupBox27: TGroupBox;
Layout34: TLayout;
Edit20: TEdit;
SearchEditButton19: TSearchEditButton;
Layout35: TLayout;
Button9: TButton;
VertScrollBox7: TVertScrollBox;
GroupBox28: TGroupBox;
Layout36: TLayout;
@ -242,6 +206,8 @@ type
Label3: TLabel;
SpinBox3: TSpinBox;
CheckBox6: TCheckBox;
Label8: TLabel;
ComboEdit3: TComboEdit;
procedure FormShow(Sender: TObject);
procedure SearchEditButton1Click(Sender: TObject);
procedure SearchEditButton3Click(Sender: TObject);
@ -255,9 +221,6 @@ type
procedure SearchEditButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure ComboBox5Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure SearchEditButton10Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure ComboBox7Change(Sender: TObject);
procedure ComboBox6Change(Sender: TObject);
procedure ComboBox8Change(Sender: TObject);
@ -284,15 +247,9 @@ type
procedure SearchEditButton16Click(Sender: TObject);
procedure SearchEditButton15Click(Sender: TObject);
procedure SearchEditButton14Click(Sender: TObject);
procedure ComboBox16Change(Sender: TObject);
procedure SearchEditButton17Click(Sender: TObject);
procedure SearchEditButton19Click(Sender: TObject);
procedure SearchEditButton18Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure SearchEditButton23Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure ComboBox18Change(Sender: TObject);
@ -300,6 +257,12 @@ type
procedure SearchEditButton25Click(Sender: TObject);
procedure SearchEditButton24Click(Sender: TObject);
procedure CheckBox4Change(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit21Change(Sender: TObject);
procedure Edit8Change(Sender: TObject);
procedure Edit10Change(Sender: TObject);
procedure Edit14Change(Sender: TObject);
procedure Edit25Change(Sender: TObject);
private
{ Private declarations }
public
@ -379,7 +342,7 @@ begin
Insert('-t' + SpinBox13.Text, CmdStr, Length(CmdStr));
if CheckBox7.IsChecked then
Insert('-v', CmdStr, Length(CmdStr));
Insert('--basedir=' + Edit6.Text, CmdStr, Length(CmdStr));
Insert('-bd' + Edit6.Text, CmdStr, Length(CmdStr));
Insert(Edit25.Text, CmdStr, Length(CmdStr));
case DecodeMode of
0:
@ -408,14 +371,19 @@ begin
Insert('-dd' + IfThen(SpinBox4.Enabled, SpinBox4.Text, ''), CmdStr,
Length(CmdStr));
if ComboEdit1.Enabled then
Insert('-SI' + ComboEdit1.Text, CmdStr, Length(CmdStr));
Insert('-sps' + ReplaceText(ComboEdit1.Text, ' ', ''), CmdStr,
Length(CmdStr));
if CheckBox4.IsChecked then
begin
S := '';
if not ComboEdit2.Text.StartsWith('Auto', False) then
S := ':d' + ReplaceText(ComboEdit2.Text, ' ', '');
Insert('-l' + SpinBox7.Text + S, CmdStr, Length(CmdStr));
S := S + ':d' + ReplaceText(ComboEdit2.Text, ' ', '');
// S := S + ':o8';
Insert('-l' + SpinBox7.Text + IfThen(SameText(ComboEdit2.Text, 'Auto'), '',
'x') + S, CmdStr, Length(CmdStr));
end;
Insert('-p' + ReplaceText(ReplaceText(ComboEdit3.Text, '%', 'p'), ' ', '')
.ToLower, CmdStr, Length(CmdStr));
Insert('-bd' + Edit6.Text, CmdStr, Length(CmdStr));
Insert(Edit1.Text, CmdStr, Length(CmdStr));
if ComboBox3.ItemIndex = 1 then
@ -430,21 +398,6 @@ begin
Form2.Close;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
OpenDialog2.FileName := '';
if OpenDialog2.Execute then
Memo1.Lines.AddStrings(OpenDialog2.Files);
end;
procedure TForm1.Button4Click(Sender: TObject);
var
Dir: string;
begin
if SelectDirectory('', '', Dir) then
Memo1.Lines.Add(Dir);
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
SetLength(CmdStr, 0);
@ -458,18 +411,6 @@ begin
Insert(Edit9.Text, CmdStr, Length(CmdStr));
end;
procedure TForm1.Button6Click(Sender: TObject);
var
I: Integer;
begin
SetLength(CmdStr, 0);
Insert(ParamStr(0), CmdStr, Length(CmdStr));
Insert('archive', CmdStr, Length(CmdStr));
for I := 0 to Memo1.Lines.Count - 1 do
Insert(Memo1.Lines[I], CmdStr, Length(CmdStr));
Insert(Edit11.Text, CmdStr, Length(CmdStr));
end;
procedure TForm1.Button7Click(Sender: TObject);
begin
SetLength(CmdStr, 0);
@ -497,17 +438,6 @@ begin
Insert(Edit15.Text, CmdStr, Length(CmdStr));
end;
procedure TForm1.Button9Click(Sender: TObject);
begin
SetLength(CmdStr, 0);
Insert(ParamStr(0), CmdStr, Length(CmdStr));
Insert('patch', CmdStr, Length(CmdStr));
Insert('-t' + SpinBox14.Text, CmdStr, Length(CmdStr));
Insert(Edit18.Text, CmdStr, Length(CmdStr));
Insert(Edit20.Text, CmdStr, Length(CmdStr));
Insert(Edit19.Text, CmdStr, Length(CmdStr));
end;
procedure TForm1.CheckBox4Change(Sender: TObject);
begin
SpinBox7.Enabled := CheckBox4.IsChecked;
@ -544,12 +474,6 @@ begin
Edit17.Text := '';
end;
procedure TForm1.ComboBox16Change(Sender: TObject);
begin
Edit18.Text := '';
Edit20.Text := '';
end;
procedure TForm1.ComboBox17Change(Sender: TObject);
begin
Edit27.Text := '';
@ -618,6 +542,33 @@ begin
Edit10.Text := '';
end;
procedure TForm1.Edit10Change(Sender: TObject);
begin
Button7.Enabled := (Edit10.Text <> '') and (Edit13.Text <> '');;
end;
procedure TForm1.Edit14Change(Sender: TObject);
begin
Button8.Enabled := (Edit14.Text <> '') and (Edit17.Text <> '') and
(Edit16.Text <> '');
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
Button1.Enabled := Edit1.Text <> '';
end;
procedure TForm1.Edit21Change(Sender: TObject);
begin
Button10.Enabled := (Edit21.Text <> '') and (Edit23.Text <> '') and
(Edit22.Text <> '') and (Edit24.Text <> '');
end;
procedure TForm1.Edit25Change(Sender: TObject);
begin
Button11.Enabled := Edit25.Text <> '';
end;
procedure TForm1.Edit6Change(Sender: TObject);
begin
if Sender = Edit6 then
@ -629,6 +580,11 @@ begin
Edit6.Text := Edit28.Text;
end;
procedure TForm1.Edit8Change(Sender: TObject);
begin
Button5.Enabled := (Edit8.Text <> '') and (Edit7.Text <> '');
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if Edit6.Text <> GetIniString('UI', 'Plugins', '',
@ -659,8 +615,6 @@ begin
SpinBox10.Value := Max(1, CPUCount div 2);
SpinBox12.Max := CPUCount * 2;
SpinBox12.Value := Max(1, CPUCount div 2);
SpinBox14.Max := CPUCount * 2;
SpinBox14.Value := Max(1, CPUCount div 2);
SpinBox16.Max := CPUCount * 2;
SpinBox16.Value := Max(1, CPUCount div 2);
SpinBox13.Max := CPUCount * 2;
@ -668,13 +622,6 @@ begin
end;
end;
procedure TForm1.SearchEditButton10Click(Sender: TObject);
begin
SaveDialog1.FileName := '';
if SaveDialog1.Execute then
Edit11.Text := SaveDialog1.FileName;
end;
procedure TForm1.SearchEditButton11Click(Sender: TObject);
begin
SaveDialog1.FileName := '';
@ -757,47 +704,6 @@ begin
end;
end;
procedure TForm1.SearchEditButton17Click(Sender: TObject);
var
Dir: string;
begin
case ComboBox16.ItemIndex of
0:
begin
OpenDialog1.FileName := '';
if OpenDialog1.Execute then
Edit18.Text := OpenDialog1.FileName;
end;
1:
if SelectDirectory('', '', Dir) then
Edit18.Text := Dir;
end;
end;
procedure TForm1.SearchEditButton18Click(Sender: TObject);
begin
SaveDialog1.FileName := '';
if SaveDialog1.Execute then
Edit19.Text := SaveDialog1.FileName;
end;
procedure TForm1.SearchEditButton19Click(Sender: TObject);
var
Dir: string;
begin
case ComboBox16.ItemIndex of
0:
begin
OpenDialog1.FileName := '';
if OpenDialog1.Execute then
Edit20.Text := OpenDialog1.FileName;
end;
1:
if SelectDirectory('', '', Dir) then
Edit20.Text := Dir;
end;
end;
procedure TForm1.SearchEditButton1Click(Sender: TObject);
var
Dir: string;
@ -874,9 +780,7 @@ procedure TForm1.SearchEditButton23Click(Sender: TObject);
const
XTOOL_PRECOMP = $304C5458;
XTOOL_IODEC = $314C5458;
XTOOL_PATCH = $324C5458;
XTOOL_ARCH = $334C5458;
XTOOL_EXEC = $344C5458;
XTOOL_EXEC = $324C5458;
var
I: Integer;
begin
@ -889,8 +793,7 @@ begin
finally
Free;
end;
DecodeMode := IndexInt(I, [XTOOL_PRECOMP, XTOOL_IODEC, XTOOL_PATCH,
XTOOL_ARCH]);
DecodeMode := IndexInt(I, [XTOOL_PRECOMP, XTOOL_IODEC]);
if DecodeMode < 0 then
raise Exception.Create('Unsupported input');
SpinBox13.Enabled := DecodeMode in [0];

View File

@ -63,7 +63,7 @@ object Form2: TForm2
Size.Height = 242.000000000000000000
Size.PlatformDefault = False
Text = 'ZLib'
TabOrder = 5
TabOrder = 6
ContentSize = '217'
object Layout6: TLayout
Align = Top
@ -471,7 +471,7 @@ object Form2: TForm2
Size.Height = 134.000000000000000000
Size.PlatformDefault = False
Text = 'LZO'
TabOrder = 4
TabOrder = 5
ContentSize = '109'
object Layout13: TLayout
Align = Top
@ -582,7 +582,7 @@ object Form2: TForm2
Size.Height = 98.000000000000000000
Size.PlatformDefault = False
Text = 'ZSTD'
TabOrder = 3
TabOrder = 4
ContentSize = '73'
object Layout16: TLayout
Align = Top
@ -1106,6 +1106,7 @@ object Form2: TForm2
object RadioButton4: TRadioButton
Align = Left
GroupName = 'WAV'
IsChecked = True
Margins.Left = 30.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
@ -1150,6 +1151,7 @@ object Form2: TForm2
object RadioButton1: TRadioButton
Align = Client
GroupName = 'JPG'
IsChecked = True
Margins.Left = 30.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
@ -1200,7 +1202,42 @@ object Form2: TForm2
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 2
Text = 'JoJpeg (Experimental)'
Text = 'JoJpeg'
end
end
end
object Expander7: TExpander
Align = Top
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Position.X = 8.000000000000000000
Position.Y = 1504.000000000000000000
ShowCheck = False
Size.Width = 252.000000000000000000
Size.Height = 62.000000000000000000
Size.PlatformDefault = False
Text = 'DirectStorage'
TabOrder = 3
ContentSize = '37'
object Layout38: TLayout
Align = Top
Size.Width = 252.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
TabOrder = 32
object CheckBox22: TCheckBox
Align = Client
Margins.Left = 8.000000000000000000
Margins.Top = 8.000000000000000000
Margins.Right = 8.000000000000000000
Margins.Bottom = 8.000000000000000000
Size.Width = 236.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 3
Text = 'GDeflate'
OnChange = CheckBox8Change
end
end
end

View File

@ -115,6 +115,9 @@ type
VertScrollBox3: TVertScrollBox;
Expander10: TExpander;
ListBox2: TListBox;
Expander7: TExpander;
Layout38: TLayout;
CheckBox22: TCheckBox;
procedure FormShow(Sender: TObject);
procedure CheckBox3Change(Sender: TObject);
procedure CheckBox1Change(Sender: TObject);
@ -310,6 +313,8 @@ begin
FLayout1[I].Parent := FExpander;
FLayout1[I].Height := 64;
FLayout1[I].Align := TAlignLayout.Top;
// FLayout1[I].Align := TAlignLayout.None;
FLayout1[I].Position.Y := I * FLayout1[I].Height;
Insert(TCheckBox.Create(FLayout1[I]), FCheckBox, Length(FCheckBox));
FCheckBox[I].Parent := FLayout1[I];
FCheckBox[I].Height := 20;
@ -406,6 +411,8 @@ begin
AddMethod('packjpg', Res, [], []);
if CheckBox26.IsChecked and RadioButton3.IsChecked then
AddMethod('jojpeg', Res, [], []);
if CheckBox22.IsChecked then
AddMethod('gdeflate', Res, [], []);
for I := 0 to ListBox2.Items.Count - 1 do
if ListBox2.ItemByIndex(I).IsChecked then
AddMethod(ListBox2.Items[I], Res, [], []);

View File

@ -1,3 +1,63 @@
ES_R54 (0.7.9)
- added recompress streams feature
- added reassign streams feature
- added dummy codec
- added data transfer buffer for srep when dd# is used
- added memory checks to ensure memory usage does not run wild
- exectuable plugins (via xtool.ini) are no longer required when decoding if they were never used
- internal stream deduplication now reports speed and memory usage benefits
- configuration based plugins can now have multiple names (if multiple games use the same configuration)
- fixed xtool crash if an incorect path for plugins was provided
- fixed lz4/lz4hc codec bug when used directly without any plugin
- fixed an issue where using fast-lzma2 compression would crash when decoding
- fixed an issue in DirectStorage gdeflate codec
- fixed an issue with execute command in stdio mode
- deduplication memory requirements improved
- memory optimisations
- reduced memory requirements for large streams that require patching
- removed ability to inject libraries to exe (buggy)
- removed patch command (uses too much memory)
- removed archive command (no one uses it)
- updated oodle scanner
- updated lz4/lz4hc universal scanner
- updated lz4/lz4hc/lz4f codecs
- updated zlib codec
- updated zstd codec
- replaced gpu caching feature with normal system memory cache (it doesn't work well on AMD gpus), use -p#
- replaced xdelta3 with zstd patching engine
- srep64 executable considered in x64 build of xtool
ES_R53 (0.7.8)
- fixed an issue where xtool would crash on Windows XP and other systems upon closure
- memory optimisations
- improvements with database "based" plugins
ES_R52 (0.7.7)
- added universal scanner for DirectStorage gdeflate streams
- added the use of gpu for caching and virtual memory purposes
- updated depthing feature to improve stream detection when used by plugins
ES_R51 (0.7.6)
- minor bug fixes
ES_R50 (0.7.5)
- added footer feature in configuration plugins
- added thread priority controller via -T# parameter
ES_R49 (0.7.4)
- user can specify srep parameters to use via -sp#
- updated zlib codec
ES_R48 (0.7.3)
- minor bug fixes
ES_R47 (0.7.2)
- memory usage optimizations
ES_R46 (0.7.1)
- fixed issues with fast-lzma2 being unable to set correct compression level
- updated deflate stream scanner
ES_R45 (0.7.0)
- added ability to redirect base directory for plugins and libraries
- added restrictions to avoid errors with experimental codecs

136
cls_xtool.dpr Normal file
View File

@ -0,0 +1,136 @@
library cls_xtool;
{$R *.res}
{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
{$DEFINE UseFastMM}
uses
{$IFDEF UseFastMM}
FastMM4 in 'contrib\FastMM4-AVX\FastMM4.pas',
FastMM4Messages in 'contrib\FastMM4-AVX\FastMM4Messages.pas',
{$ENDIF }
WinAPI.Windows,
System.SysUtils,
System.StrUtils,
System.Classes,
System.Types,
System.Math,
System.IOUtils,
System.SyncObjs,
CLS in 'common\CLS.pas',
DStorage in 'common\DStorage.pas',
LibImport in 'common\LibImport.pas',
Threading in 'common\Threading.pas',
Utils in 'common\Utils.pas',
libc in 'contrib\LIBC\libc.pas',
lz4lib in 'contrib\LZ4Delphi\lz4lib.pas',
FuncHook in 'contrib\Delphi_MemoryModule\FuncHook.pas',
MemoryModule in 'contrib\Delphi_MemoryModule\MemoryModule.pas',
MemoryModuleHook in 'contrib\Delphi_MemoryModule\MemoryModuleHook.pas',
SynCommons in 'contrib\mORMot\SynCommons.pas',
SynCrypto in 'contrib\mORMot\SynCrypto.pas',
SynLZ in 'contrib\mORMot\SynLZ.pas',
SynTable in 'contrib\mORMot\SynTable.pas',
oObjects in 'contrib\ParseExpression\oObjects.pas',
ParseClass in 'contrib\ParseExpression\ParseClass.pas',
ParseExpr in 'contrib\ParseExpression\ParseExpr.pas',
XXHASHLIB in 'contrib\XXHASH4Delphi\XXHASHLIB.pas',
ZSTDLib in 'contrib\ZSTD4Delphi\ZSTDLib.pas',
InitCode in 'InitCode.pas',
BrunsliDLL in 'imports\BrunsliDLL.pas',
FLACDLL in 'imports\FLACDLL.pas',
FLZMA2DLL in 'imports\FLZMA2DLL.pas',
JoJpegDLL in 'imports\JoJpegDLL.pas',
LZ4DLL in 'imports\LZ4DLL.pas',
LZODLL in 'imports\LZODLL.pas',
OodleDLL in 'imports\OodleDLL.pas',
PackJPGDLL in 'imports\PackJPGDLL.pas',
PreflateDLL in 'imports\PreflateDLL.pas',
ReflateDLL in 'imports\ReflateDLL.pas',
ZLibDLL in 'imports\ZLibDLL.pas',
ZSTDDLL in 'imports\ZSTDDLL.pas',
lz4 in 'sources\lz4.pas',
PrecompMain in 'precompressor\PrecompMain.pas',
PrecompUtils in 'precompressor\PrecompUtils.pas',
PrecompCrypto in 'precompressor\PrecompCrypto.pas',
PrecompZLib in 'precompressor\PrecompZLib.pas',
PrecompLZ4 in 'precompressor\PrecompLZ4.pas',
PrecompLZO in 'precompressor\PrecompLZO.pas',
PrecompZSTD in 'precompressor\PrecompZSTD.pas',
PrecompMedia in 'precompressor\PrecompMedia.pas',
PrecompOodle in 'precompressor\PrecompOodle.pas',
PrecompINI in 'precompressor\PrecompINI.pas',
PrecompINIEx in 'precompressor\PrecompINIEx.pas',
PrecompSearch in 'precompressor\PrecompSearch.pas',
PrecompDLL in 'precompressor\PrecompDLL.pas',
PrecompEXE in 'precompressor\PrecompEXE.pas',
PrecompDStorage in 'precompressor\PrecompDStorage.pas';
{$SETPEFLAGS IMAGE_FILE_LARGE_ADDRESS_AWARE}
function ClsMain(operation: Integer; Callback: CLS_CALLBACK; Instance: Pointer)
: Integer cdecl;
const
BufferSize = 1048576;
var
CLS: TCLSStream;
PrecompEnc: PrecompMain.TEncodeOptions;
PrecompDec: PrecompMain.TDecodeOptions;
I: Integer;
Str: array [0 .. 255] of AnsiChar;
StrArray: TArray<String>;
begin
Result := CLS_ERROR_GENERAL;
case (operation) of
CLS_COMPRESS:
begin
CLS := TCLSStream.Create(Callback, Instance);
try
FillChar(Str, Length(Str), 0);
Callback(Instance, CLS_GET_PARAMSTR, @Str[0], Length(Str));
StrArray := DecodeStr(String(Str), ':');
for I := Low(StrArray) to High(StrArray) do
StrArray[I] := '-' + StrArray[I];
PrecompMain.Parse(StrArray, PrecompEnc);
try
PrecompMain.Encode(CLS, CLS, PrecompEnc);
Result := CLS_OK;
except
Result := CLS_ERROR_GENERAL;
end;
finally
CLS.Free;
end;
end;
CLS_DECOMPRESS:
begin
CLS := TCLSStream.Create(Callback, Instance);
try
CLS.ReadBuffer(I, I.Size);
case I of
XTOOL_PRECOMP:
begin
PrecompMain.Parse(['-t100p'], PrecompDec);
try
PrecompMain.Decode(CLS, CLS, PrecompDec);
Result := CLS_OK;
except
Result := CLS_ERROR_GENERAL;
end;
end;
end;
finally
CLS.Free;
end;
end;
else
Result := CLS_ERROR_NOT_IMPLEMENTED;
end;
end;
exports ClsMain;
begin
end.

1148
cls_xtool.dproj Normal file

File diff suppressed because it is too large Load Diff

BIN
cls_xtool.res Normal file

Binary file not shown.

102
common/CLS.pas Normal file
View File

@ -0,0 +1,102 @@
unit CLS;
interface
uses
System.SysUtils, System.Classes;
type
CLS_CALLBACK = function(Instance: Pointer; callback_operation: Integer;
ptr: Pointer; n: Integer): Integer; cdecl;
CLS_MAIN = function(operation: Integer; Callback: CLS_CALLBACK;
Instance: Pointer): Integer; cdecl;
const
CLS_INIT = 1;
CLS_DONE = 2;
CLS_FLUSH = 6;
CLS_COMPRESS = 3;
CLS_DECOMPRESS = 4;
CLS_PREPARE_METHOD = 5;
CLS_FULL_READ = 4096;
CLS_PARTIAL_READ = 5120;
CLS_FULL_WRITE = 6144;
CLS_PARTIAL_WRITE = 7168;
CLS_MALLOC = 1;
CLS_FREE = 2;
CLS_GET_PARAMSTR = 3;
CLS_SET_PARAMSTR = 4;
CLS_THREADS = 5;
CLS_MEMORY = 6;
CLS_DECOMPRESSION_MEMORY = 7;
CLS_DECOMPRESSOR_VERSION = 8;
CLS_BLOCK = 9;
CLS_EXPAND_DATA = 10;
CLS_ID = 101;
CLS_VERSION = 102;
CLS_THREAD_SAFE = 103;
CLS_OK = 0;
CLS_ERROR_GENERAL = -1;
CLS_ERROR_NOT_IMPLEMENTED = -2;
CLS_ERROR_NOT_ENOUGH_MEMORY = -3;
CLS_ERROR_READ = -4;
CLS_ERROR_WRITE = -5;
CLS_ERROR_ONLY_DECOMPRESS = -6;
CLS_ERROR_INVALID_COMPRESSOR = -7;
CLS_ERROR_BAD_COMPRESSED_DATA = -8;
CLS_ERROR_NO_MORE_DATA_REQUIRED = -9;
CLS_ERROR_OUTBLOCK_TOO_SMALL = -10;
CLS_PARAM_INT = -1;
CLS_PARAM_STRING = -2;
CLS_PARAM_MEMORY_MB = -3;
CLS_MAX_PARAMSTR_SIZE = 256;
CLS_MAX_ERROR_MSG = 256;
type
TCLSStream = class(TStream)
protected
FInstance: Pointer;
FCallback: CLS_CALLBACK;
FDone: Boolean;
public
constructor Create(Callback: CLS_CALLBACK; Instance: Pointer);
function Read(var Buffer; Count: Longint): Longint; override;
function Write(const Buffer; Count: Longint): Longint; override;
end;
implementation
constructor TCLSStream.Create(Callback: CLS_CALLBACK; Instance: Pointer);
begin
inherited Create;
FCallback := Callback;
FInstance := Instance;
FDone := False;
end;
function TCLSStream.Read(var Buffer; Count: Longint): Longint;
begin
Result := FCallback(FInstance, CLS_FULL_READ, @Buffer, Count);
end;
function TCLSStream.Write(const Buffer; Count: Longint): Longint;
begin
Result := FCallback(FInstance, CLS_PARTIAL_WRITE, @Buffer, Count);
if (Result = CLS_ERROR_NO_MORE_DATA_REQUIRED) and (FDone = False) then
begin
Result := Count;
FDone := True;
end
else if Result < 0 then
Result := 0;
end;
end.

1147
common/DStorage.pas Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,20 +5,31 @@ interface
uses
MemoryModule,
WinAPI.Windows,
System.SysUtils, System.Classes, System.Character;
System.SysUtils, System.Classes, System.Character, System.RTLConsts;
type
TLibImport = class
private
FIsMemoryLib: Boolean;
FDLLLoaded: Boolean;
FDLLStream: TResourceStream;
FImageFileName: String;
FDLLStream: TCustomMemoryStream;
FDLLHandle: NativeUInt;
FImagePtr: Pointer;
FImageSize: NativeInt;
public
constructor Create(ALibrary: String);
constructor Create;
destructor Destroy; override;
procedure LoadLib(ALibrary: String)overload;
procedure LoadLib(AMemory: Pointer; ASize: NativeInt)overload;
procedure LoadLib(AStream: TStream; ASize: NativeInt)overload;
procedure UnloadLib;
function GetProcAddr(AProcName: PAnsiChar): Pointer;
property Loaded: Boolean read FDLLLoaded;
property IsMemory: Boolean read FIsMemoryLib;
property ImageFileName: String read FImageFileName;
property ImagePtr: Pointer read FImagePtr;
property ImageSize: NativeInt read FImageSize;
end;
procedure InjectLib(Source, Dest: String);
@ -34,7 +45,7 @@ function FileToResourceName(FileName: String): String;
var
I: Integer;
begin
Result := ChangeFileExt(ExtractFileName(FileName), '').ToUpper;
Result := ExtractFileName(FileName).ToUpper;
for I := 1 to Result.Length do
if not Result[I].IsLetterOrDigit then
Result[I] := '_';
@ -77,38 +88,91 @@ begin
end;
end;
constructor TLibImport.Create(ALibrary: String);
var
LResName: String;
constructor TLibImport.Create;
begin
inherited Create;
FDLLLoaded := False;
FImageFileName := '';
FImagePtr := nil;
FImageSize := 0;
end;
destructor TLibImport.Destroy;
begin
UnloadLib;
inherited Destroy;
end;
procedure TLibImport.LoadLib(ALibrary: String);
var
LResName: String;
szFileName: array [0 .. MAX_PATH] of char;
begin
UnloadLib;
LResName := FileToResourceName(ALibrary);
FIsMemoryLib := ResourceExists(LResName);
if FIsMemoryLib then
begin
FDLLStream := TResourceStream.Create(HInstance, LResName, RT_RCDATA);
WriteLn(ErrOutput, FDLLStream.Size.ToString);
FDLLHandle := NativeUInt(MemoryLoadLibary(FDLLStream.Memory));
FDLLLoaded := Assigned(Pointer(FDLLHandle));
end
else
begin
FDLLStream := TMemoryStream.Create;
FDLLHandle := LoadLibrary(PWideChar(ALibrary));
FDLLLoaded := FDLLHandle >= 32;
if FDLLLoaded then
begin
FillChar(szFileName, sizeof(szFileName), #0);
GetModuleFileName(FDLLHandle, szFileName, MAX_PATH);
end;
end;
FImageFileName := ALibrary;
FImagePtr := FDLLStream.Memory;
FImageSize := FDLLStream.Size;
end;
destructor TLibImport.Destroy;
procedure TLibImport.LoadLib(AMemory: Pointer; ASize: NativeInt);
begin
UnloadLib;
FIsMemoryLib := True;
FDLLStream := TMemoryStream.Create;
FDLLStream.WriteBuffer(AMemory, ASize);
FDLLHandle := NativeUInt(MemoryLoadLibary(FDLLStream.Memory));
FDLLLoaded := Assigned(Pointer(FDLLHandle));
FImageFileName := '';
FImagePtr := FDLLStream.Memory;
FImageSize := FDLLStream.Size;
end;
procedure TLibImport.LoadLib(AStream: TStream; ASize: NativeInt);
begin
UnloadLib;
FIsMemoryLib := True;
FDLLStream := TMemoryStream.Create;
FDLLStream.CopyFrom(AStream, ASize);
FDLLHandle := NativeUInt(MemoryLoadLibary(FDLLStream.Memory));
FDLLLoaded := Assigned(Pointer(FDLLHandle));
FImageFileName := '';
FImagePtr := FDLLStream.Memory;
FImageSize := FDLLStream.Size;
end;
procedure TLibImport.UnloadLib;
begin
if FIsMemoryLib then
begin
if FDLLLoaded then
MemoryFreeLibrary(Pointer(FDLLHandle));
FDLLStream.Free;
MemoryFreeLibrary(Pointer(FDLLHandle));
end
else if FDLLLoaded then
FreeLibrary(FDLLHandle);
inherited Destroy;
if FDLLLoaded then
FDLLStream.Free;
FDLLLoaded := False;
FImagePtr := nil;
FImageSize := 0;
end;
function TLibImport.GetProcAddr(AProcName: PAnsiChar): Pointer;
@ -125,6 +189,8 @@ procedure InjectLib(Source, Dest: String);
var
LResName: String;
begin
if not FileExists(Source) then
raise Exception.CreateRes(@SSpecifiedFileNotFound);
LResName := FileToResourceName(Source);
UpdateFileResource(Source, Dest, LResName);
end;

File diff suppressed because it is too large Load Diff

54
contrib/LIBC/.gitignore vendored Normal file
View File

@ -0,0 +1,54 @@
*.exe
*.dcu
__history/*.*
__recovery/*.*
Win32/*.*
Win64/*.*
__history/libc.pas.~1~
__history/libc.pas.~2~
__history/libc.pas.~3~
__history/libgcc.pas.~11~
__history/libgcc.pas.~12~
__history/libgcc.pas.~13~
__history/libgcc.pas.~14~
__history/libgcc.pas.~15~
__history/libgcc.pas.~16~
__history/libgcc.pas.~17~
__history/libgcc.pas.~18~
__history/libgcc.pas.~19~
__history/libgcc.pas.~20~
__history/libmsvcrt.pas.~1~
__history/libmsvcrt.pas.~2~
__history/libmsvcrt.pas.~3~
__history/libmsvcrt.pas.~4~
__history/libmsvcrt.pas.~5~
__history/libmsvcrt.pas.~6~
__history/libmsvcrt.pas.~7~
__history/libmsvcrt.pas.~8~
__history/libmsvcrt.pas.~9~
__history/libucrt.pas.~10~
__history/libucrt.pas.~11~
__history/libucrt.pas.~12~
__history/libucrt.pas.~13~
__history/libucrt.pas.~14~
__history/libucrt.pas.~15~
__history/libucrt.pas.~6~
__history/libucrt.pas.~7~
__history/libucrt.pas.~8~
__history/libucrt.pas.~9~
__history/pkglibc.dpk.~1~
__history/pkglibc.dpk.~2~
__history/pkglibc.dpk.~3~
__history/testlibgcc.pas.~1~
__history/testlibmsvcrt.pas.~1~
__history/testlibmsvcrt.pas.~2~
__history/testlibmsvcrt.pas.~3~
__history/testlibmsvcrt.pas.~4~
__history/testlibmsvcrt.pas.~5~
__history/testlibucrt.pas.~1~
__history/testlibucrt.pas.~2~
__history/testucrt.dpr.~1~
__history/testucrt.dpr.~2~
__history/testucrt.dpr.~3~
__history/testucrt.dpr.~4~
__history/testucrt.dpr.~5~

8
contrib/LIBC/README.md Normal file
View File

@ -0,0 +1,8 @@
# LIBC
a C Run Time library for Delphi, helps link with other C object files
Delphi come up a build in unit named System.Win.Crtl do the same job. How ever, this build in Unit didn't cover enough C functions.
I just copy paste this Unit, and Appends any functions I found when linking other C object files into it.
So, it is a better way to use this unit than the buildin one.
系统自带单元System.Win.Crtl的复制粘贴+扩展版本覆盖更多的C标准库和一些特定编译器的内建函数当你想链接的C目标文件调用到这些函数时添加一句uses libc可能可以帮助你成功链接。

BIN
contrib/LIBC/_chkstk.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/chkstk.x64.o Normal file

Binary file not shown.

BIN
contrib/LIBC/chkstk.x86.o Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
contrib/LIBC/cpu_disp.x64.o Normal file

Binary file not shown.

BIN
contrib/LIBC/cpu_disp.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/ctzdi2.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/ctzti2.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/divdi3.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/int_util.x86.o Normal file

Binary file not shown.

1096
contrib/LIBC/libc.pas Normal file

File diff suppressed because it is too large Load Diff

1088
contrib/LIBC/libgcc.pas Normal file

File diff suppressed because it is too large Load Diff

7620
contrib/LIBC/libmsvcrt.pas Normal file

File diff suppressed because it is too large Load Diff

15799
contrib/LIBC/libucrt.pas Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,457 @@
unit libvcruntime140;
interface
{$IFDEF WIN64}
procedure wcsstr;external;
{$L x64/libvcruntime140_apps00070.o}
procedure wcsrchr;external;
{$L x64/libvcruntime140_apps00069.o}
procedure wcschr;external;
{$L x64/libvcruntime140_apps00068.o}
procedure unexpected;external;
{$L x64/libvcruntime140_apps00067.o}
procedure strstr;external;
{$L x64/libvcruntime140_apps00066.o}
procedure strrchr;external;
{$L x64/libvcruntime140_apps00065.o}
procedure strchr;external;
{$L x64/libvcruntime140_apps00064.o}
procedure set_unexpected;external;
{$L x64/libvcruntime140_apps00063.o}
procedure memset;external;
{$L x64/libvcruntime140_apps00062.o}
procedure memmove;external;
{$L x64/libvcruntime140_apps00061.o}
procedure memcpy;external;
{$L x64/libvcruntime140_apps00060.o}
procedure memcmp;external;
{$L x64/libvcruntime140_apps00059.o}
procedure memchr;external;
{$L x64/libvcruntime140_apps00058.o}
procedure longjmp;external;
{$L x64/libvcruntime140_apps00057.o}
procedure _set_se_translator;external;
{$L x64/libvcruntime140_apps00056.o}
procedure _set_purecall_handler;external;
{$L x64/libvcruntime140_apps00055.o}
procedure _purecall;external;
{$L x64/libvcruntime140_apps00054.o}
procedure _local_unwind;external;
{$L x64/libvcruntime140_apps00053.o}
procedure _is_exception_typeof;external;
{$L x64/libvcruntime140_apps00052.o}
procedure _get_unexpected;external;
{$L x64/libvcruntime140_apps00051.o}
procedure _get_purecall_handler;external;
{$L x64/libvcruntime140_apps00050.o}
procedure __vcrt_LoadLibraryExW;external;
{$L x64/libvcruntime140_apps00049.o}
procedure __vcrt_InitializeCriticalSectionEx;external;
{$L x64/libvcruntime140_apps00048.o}
procedure __vcrt_GetModuleHandleW;external;
{$L x64/libvcruntime140_apps00047.o}
procedure __vcrt_GetModuleFileNameW;external;
{$L x64/libvcruntime140_apps00046.o}
procedure __uncaught_exceptions;external;
{$L x64/libvcruntime140_apps00045.o}
procedure __uncaught_exception;external;
{$L x64/libvcruntime140_apps00044.o}
procedure __unDNameEx;external;
{$L x64/libvcruntime140_apps00043.o}
procedure __unDName;external;
{$L x64/libvcruntime140_apps00042.o}
procedure __telemetry_main_return_trigger;external;
{$L x64/libvcruntime140_apps00041.o}
procedure __telemetry_main_invoke_trigger;external;
{$L x64/libvcruntime140_apps00040.o}
procedure __std_type_info_name;external;
{$L x64/libvcruntime140_apps00039.o}
procedure __std_type_info_hash;external;
{$L x64/libvcruntime140_apps00038.o}
procedure __std_type_info_destroy_list;external;
{$L x64/libvcruntime140_apps00037.o}
procedure __std_type_info_compare;external;
{$L x64/libvcruntime140_apps00036.o}
procedure __std_terminate;external;
{$L x64/libvcruntime140_apps00035.o}
procedure __std_exception_destroy;external;
{$L x64/libvcruntime140_apps00034.o}
procedure __std_exception_copy;external;
{$L x64/libvcruntime140_apps00033.o}
procedure __report_gsfailure;external;
{$L x64/libvcruntime140_apps00032.o}
procedure __processing_throw;external;
{$L x64/libvcruntime140_apps00031.o}
procedure __intrinsic_setjmpex;external;
{$L x64/libvcruntime140_apps00030.o}
procedure __intrinsic_setjmp;external;
{$L x64/libvcruntime140_apps00029.o}
procedure __current_exception_context;external;
{$L x64/libvcruntime140_apps00028.o}
procedure __current_exception;external;
{$L x64/libvcruntime140_apps00027.o}
procedure __TypeMatch;external;
{$L x64/libvcruntime140_apps00026.o}
procedure __RTtypeid;external;
{$L x64/libvcruntime140_apps00025.o}
procedure __RTDynamicCast;external;
{$L x64/libvcruntime140_apps00024.o}
procedure __RTCastToVoid;external;
{$L x64/libvcruntime140_apps00023.o}
procedure __NLG_Return2;external;
{$L x64/libvcruntime140_apps00022.o}
procedure __NLG_Dispatch2;external;
{$L x64/libvcruntime140_apps00021.o}
procedure __GetPlatformExceptionInfo;external;
{$L x64/libvcruntime140_apps00020.o}
procedure __FrameUnwindFilter;external;
{$L x64/libvcruntime140_apps00019.o}
procedure __DestructExceptionObject;external;
{$L x64/libvcruntime140_apps00018.o}
procedure __CxxUnregisterExceptionObject;external;
{$L x64/libvcruntime140_apps00017.o}
procedure __CxxRegisterExceptionObject;external;
{$L x64/libvcruntime140_apps00016.o}
procedure __CxxQueryExceptionSize;external;
{$L x64/libvcruntime140_apps00015.o}
procedure __CxxFrameHandler3;external;
{$L x64/libvcruntime140_apps00014.o}
procedure __CxxFrameHandler2;external;
{$L x64/libvcruntime140_apps00013.o}
procedure __CxxFrameHandler;external;
{$L x64/libvcruntime140_apps00012.o}
procedure __CxxExceptionFilter;external;
{$L x64/libvcruntime140_apps00011.o}
procedure __CxxDetectRethrow;external;
{$L x64/libvcruntime140_apps00010.o}
procedure __C_specific_handler_noexcept;external;
{$L x64/libvcruntime140_apps00009.o}
procedure __C_specific_handler;external;
{$L x64/libvcruntime140_apps00008.o}
procedure __BuildCatchObjectHelper;external;
{$L x64/libvcruntime140_apps00007.o}
procedure __BuildCatchObject;external;
{$L x64/libvcruntime140_apps00006.o}
procedure __AdjustPointer;external;
{$L x64/libvcruntime140_apps00005.o}
procedure _SetWinRTOutOfMemoryExceptionCallback;external;
{$L x64/libvcruntime140_apps00004.o}
procedure _IsExceptionObjectToBeDestroyed;external;
{$L x64/libvcruntime140_apps00003.o}
procedure _FindAndUnlinkFrame;external;
{$L x64/libvcruntime140_apps00002.o}
procedure _CxxThrowException;external;
{$L x64/libvcruntime140_apps00001.o}
procedure _CreateFrameInfo;external;
{$L x64/libvcruntime140_apps00000.o}
var
__lib64_libvcruntime140_app_a_iname : UInt64;
_head_lib64_libvcruntime140_app_a : UInt64;
__imp_wcsstr : UInt64;
__imp_wcsrchr : UInt64;
__imp_wcschr : UInt64;
__imp_unexpected : UInt64;
__imp_strstr : UInt64;
__imp_strrchr : UInt64;
__imp_strchr : UInt64;
__imp_set_unexpected : UInt64;
__imp_memset : UInt64;
__imp_memmove : UInt64;
__imp_memcpy : UInt64;
__imp_memcmp : UInt64;
__imp_memchr : UInt64;
__imp_longjmp : UInt64;
__imp__set_se_translator : UInt64;
__imp__set_purecall_handler : UInt64;
__imp__purecall : UInt64;
__imp__local_unwind : UInt64;
__imp__is_exception_typeof : UInt64;
__imp__get_unexpected : UInt64;
__imp__get_purecall_handler : UInt64;
__imp___vcrt_LoadLibraryExW : UInt64;
__imp___vcrt_InitializeCriticalSectionEx : UInt64;
__imp___vcrt_GetModuleHandleW : UInt64;
__imp___vcrt_GetModuleFileNameW : UInt64;
__imp___uncaught_exceptions : UInt64;
__imp___uncaught_exception : UInt64;
__imp___unDNameEx : UInt64;
__imp___unDName : UInt64;
__imp___telemetry_main_return_trigger : UInt64;
__imp___telemetry_main_invoke_trigger : UInt64;
__imp___std_type_info_name : UInt64;
__imp___std_type_info_hash : UInt64;
__imp___std_type_info_destroy_list : UInt64;
__imp___std_type_info_compare : UInt64;
__imp___std_terminate : UInt64;
__imp___std_exception_destroy : UInt64;
__imp___std_exception_copy : UInt64;
__imp___report_gsfailure : UInt64;
__imp___processing_throw : UInt64;
__imp___intrinsic_setjmpex : UInt64;
__imp___intrinsic_setjmp : UInt64;
__imp___current_exception_context : UInt64;
__imp___current_exception : UInt64;
__imp___TypeMatch : UInt64;
__imp___RTtypeid : UInt64;
__imp___RTDynamicCast : UInt64;
__imp___RTCastToVoid : UInt64;
__imp___NLG_Return2 : UInt64;
__imp___NLG_Dispatch2 : UInt64;
__imp___GetPlatformExceptionInfo : UInt64;
__imp___FrameUnwindFilter : UInt64;
__imp___DestructExceptionObject : UInt64;
__imp___CxxUnregisterExceptionObject : UInt64;
__imp___CxxRegisterExceptionObject : UInt64;
__imp___CxxQueryExceptionSize : UInt64;
__imp___CxxFrameHandler3 : UInt64;
__imp___CxxFrameHandler2 : UInt64;
__imp___CxxFrameHandler : UInt64;
__imp___CxxExceptionFilter : UInt64;
__imp___CxxDetectRethrow : UInt64;
__imp___C_specific_handler_noexcept : UInt64;
__imp___C_specific_handler : UInt64;
__imp___BuildCatchObjectHelper : UInt64;
__imp___BuildCatchObject : UInt64;
__imp___AdjustPointer : UInt64;
__imp__SetWinRTOutOfMemoryExceptionCallback : UInt64;
__imp__IsExceptionObjectToBeDestroyed : UInt64;
__imp__FindAndUnlinkFrame : UInt64;
__imp__CxxThrowException : UInt64;
__imp__CreateFrameInfo : UInt64;
{$ELSE}
procedure _wcsstr;external;
{$L x86/libvcruntime140_apps00080.o}
procedure _wcsrchr;external;
{$L x86/libvcruntime140_apps00079.o}
procedure _wcschr;external;
{$L x86/libvcruntime140_apps00078.o}
procedure _unexpected;external;
{$L x86/libvcruntime140_apps00077.o}
procedure _strstr;external;
{$L x86/libvcruntime140_apps00076.o}
procedure _strrchr;external;
{$L x86/libvcruntime140_apps00075.o}
procedure _strchr;external;
{$L x86/libvcruntime140_apps00074.o}
procedure _set_unexpected;external;
{$L x86/libvcruntime140_apps00073.o}
procedure _memset;external;
{$L x86/libvcruntime140_apps00072.o}
procedure _memmove;external;
{$L x86/libvcruntime140_apps00071.o}
procedure _memcpy;external;
{$L x86/libvcruntime140_apps00070.o}
procedure _memcmp;external;
{$L x86/libvcruntime140_apps00069.o}
procedure _memchr;external;
{$L x86/libvcruntime140_apps00068.o}
procedure _longjmp;external;
{$L x86/libvcruntime140_apps00067.o}
procedure __setjmp3;external;
{$L x86/libvcruntime140_apps00066.o}
procedure __set_se_translator;external;
{$L x86/libvcruntime140_apps00065.o}
procedure __set_purecall_handler;external;
{$L x86/libvcruntime140_apps00064.o}
procedure __purecall;external;
{$L x86/libvcruntime140_apps00061.o}
procedure __longjmpex;external;
{$L x86/libvcruntime140_apps00060.o}
procedure __local_unwind4;external;
{$L x86/libvcruntime140_apps00059.o}
procedure __local_unwind2;external;
{$L x86/libvcruntime140_apps00058.o}
procedure __is_exception_typeof;external;
{$L x86/libvcruntime140_apps00057.o}
procedure __global_unwind2;external;
{$L x86/libvcruntime140_apps00056.o}
procedure __get_unexpected;external;
{$L x86/libvcruntime140_apps00055.o}
procedure __get_purecall_handler;external;
{$L x86/libvcruntime140_apps00054.o}
procedure __except_handler4_common;external;
{$L x86/libvcruntime140_apps00053.o}
procedure __except_handler3;external;
{$L x86/libvcruntime140_apps00052.o}
procedure __except_handler2;external;
{$L x86/libvcruntime140_apps00051.o}
procedure __chkesp;external;
{$L x86/libvcruntime140_apps00050.o}
procedure ___vcrt_LoadLibraryExW;external;
{$L x86/libvcruntime140_apps00049.o}
procedure ___vcrt_InitializeCriticalSectionEx;external;
{$L x86/libvcruntime140_apps00048.o}
procedure ___vcrt_GetModuleHandleW;external;
{$L x86/libvcruntime140_apps00047.o}
procedure ___vcrt_GetModuleFileNameW;external;
{$L x86/libvcruntime140_apps00046.o}
procedure ___uncaught_exceptions;external;
{$L x86/libvcruntime140_apps00045.o}
procedure ___uncaught_exception;external;
{$L x86/libvcruntime140_apps00044.o}
procedure ___unDNameEx;external;
{$L x86/libvcruntime140_apps00043.o}
procedure ___unDName;external;
{$L x86/libvcruntime140_apps00042.o}
procedure ___telemetry_main_return_trigger;external;
{$L x86/libvcruntime140_apps00041.o}
procedure ___telemetry_main_invoke_trigger;external;
{$L x86/libvcruntime140_apps00040.o}
procedure ___std_type_info_name;external;
{$L x86/libvcruntime140_apps00039.o}
procedure ___std_type_info_hash;external;
{$L x86/libvcruntime140_apps00038.o}
procedure ___std_type_info_destroy_list;external;
{$L x86/libvcruntime140_apps00037.o}
procedure ___std_type_info_compare;external;
{$L x86/libvcruntime140_apps00036.o}
procedure ___std_terminate;external;
{$L x86/libvcruntime140_apps00035.o}
procedure ___std_exception_destroy;external;
{$L x86/libvcruntime140_apps00034.o}
procedure ___std_exception_copy;external;
{$L x86/libvcruntime140_apps00033.o}
procedure ___report_gsfailure;external;
{$L x86/libvcruntime140_apps00032.o}
procedure ___processing_throw;external;
{$L x86/libvcruntime140_apps00031.o}
procedure ___intrinsic_setjmp;external;
{$L x86/libvcruntime140_apps00030.o}
procedure ___current_exception_context;external;
{$L x86/libvcruntime140_apps00029.o}
procedure ___current_exception;external;
{$L x86/libvcruntime140_apps00028.o}
procedure ___TypeMatch;external;
{$L x86/libvcruntime140_apps00027.o}
procedure ___RTtypeid;external;
{$L x86/libvcruntime140_apps00026.o}
procedure ___RTDynamicCast;external;
{$L x86/libvcruntime140_apps00025.o}
procedure ___RTCastToVoid;external;
{$L x86/libvcruntime140_apps00024.o}
procedure ___GetPlatformExceptionInfo;external;
{$L x86/libvcruntime140_apps00023.o}
procedure ___FrameUnwindFilter;external;
{$L x86/libvcruntime140_apps00022.o}
procedure ___DestructExceptionObject;external;
{$L x86/libvcruntime140_apps00021.o}
procedure ___CxxUnregisterExceptionObject;external;
{$L x86/libvcruntime140_apps00020.o}
procedure ___CxxRegisterExceptionObject;external;
{$L x86/libvcruntime140_apps00019.o}
procedure ___CxxQueryExceptionSize;external;
{$L x86/libvcruntime140_apps00018.o}
procedure ___CxxFrameHandler3;external;
{$L x86/libvcruntime140_apps00016.o}
procedure ___CxxFrameHandler2;external;
{$L x86/libvcruntime140_apps00015.o}
procedure ___CxxFrameHandler;external;
{$L x86/libvcruntime140_apps00014.o}
procedure ___CxxExceptionFilter;external;
{$L x86/libvcruntime140_apps00013.o}
procedure ___CxxDetectRethrow;external;
{$L x86/libvcruntime140_apps00012.o}
procedure ___BuildCatchObjectHelper;external;
{$L x86/libvcruntime140_apps00011.o}
procedure ___BuildCatchObject;external;
{$L x86/libvcruntime140_apps00010.o}
procedure ___AdjustPointer;external;
{$L x86/libvcruntime140_apps00009.o}
procedure __SetWinRTOutOfMemoryExceptionCallback;external;
{$L x86/libvcruntime140_apps00008.o}
procedure __NLG_Return2;external;
{$L x86/libvcruntime140_apps00007.o}
procedure __NLG_Return;external;
{$L x86/libvcruntime140_apps00006.o}
procedure __NLG_Dispatch2;external;
{$L x86/libvcruntime140_apps00005.o}
procedure __IsExceptionObjectToBeDestroyed;external;
{$L x86/libvcruntime140_apps00004.o}
procedure __FindAndUnlinkFrame;external;
{$L x86/libvcruntime140_apps00003.o}
procedure __EH_prolog;external;
{$L x86/libvcruntime140_apps00002.o}
procedure __CreateFrameInfo;external;
{$L x86/libvcruntime140_apps00000.o}
var
__lib32_libvcruntime140_app_a_iname : UInt64;
__head_lib32_libvcruntime140_app_a : UInt64;
__imp__wcsstr : UInt64;
__imp__wcsrchr : UInt64;
__imp__wcschr : UInt64;
__imp__unexpected : UInt64;
__imp__strstr : UInt64;
__imp__strrchr : UInt64;
__imp__strchr : UInt64;
__imp__set_unexpected : UInt64;
__imp__memset : UInt64;
__imp__memmove : UInt64;
__imp__memcpy : UInt64;
__imp__memcmp : UInt64;
__imp__memchr : UInt64;
__imp__longjmp : UInt64;
__imp___setjmp3 : UInt64;
__imp___set_se_translator : UInt64;
__imp___set_purecall_handler : UInt64;
__imp___purecall : UInt64;
__imp___longjmpex : UInt64;
__imp___local_unwind4 : UInt64;
__imp___local_unwind2 : UInt64;
__imp___is_exception_typeof : UInt64;
__imp___global_unwind2 : UInt64;
__imp___get_unexpected : UInt64;
__imp___get_purecall_handler : UInt64;
__imp___except_handler4_common : UInt64;
__imp___except_handler3 : UInt64;
__imp___except_handler2 : UInt64;
__imp___chkesp : UInt64;
__imp____vcrt_LoadLibraryExW : UInt64;
__imp____vcrt_InitializeCriticalSectionEx : UInt64;
__imp____vcrt_GetModuleHandleW : UInt64;
__imp____vcrt_GetModuleFileNameW : UInt64;
__imp____uncaught_exceptions : UInt64;
__imp____uncaught_exception : UInt64;
__imp____unDNameEx : UInt64;
__imp____unDName : UInt64;
__imp____telemetry_main_return_trigger : UInt64;
__imp____telemetry_main_invoke_trigger : UInt64;
__imp____std_type_info_name : UInt64;
__imp____std_type_info_hash : UInt64;
__imp____std_type_info_destroy_list : UInt64;
__imp____std_type_info_compare : UInt64;
__imp____std_terminate : UInt64;
__imp____std_exception_destroy : UInt64;
__imp____std_exception_copy : UInt64;
__imp____report_gsfailure : UInt64;
__imp____processing_throw : UInt64;
__imp____intrinsic_setjmp : UInt64;
__imp____current_exception_context : UInt64;
__imp____current_exception : UInt64;
__imp____TypeMatch : UInt64;
__imp____RTtypeid : UInt64;
__imp____RTDynamicCast : UInt64;
__imp____RTCastToVoid : UInt64;
__imp____GetPlatformExceptionInfo : UInt64;
__imp____FrameUnwindFilter : UInt64;
__imp____DestructExceptionObject : UInt64;
__imp____CxxUnregisterExceptionObject : UInt64;
__imp____CxxRegisterExceptionObject : UInt64;
__imp____CxxQueryExceptionSize : UInt64;
__imp____CxxFrameHandler3 : UInt64;
__imp____CxxFrameHandler2 : UInt64;
__imp____CxxFrameHandler : UInt64;
__imp____CxxExceptionFilter : UInt64;
__imp____CxxDetectRethrow : UInt64;
__imp____BuildCatchObjectHelper : UInt64;
__imp____BuildCatchObject : UInt64;
__imp____AdjustPointer : UInt64;
__imp___SetWinRTOutOfMemoryExceptionCallback : UInt64;
__imp___NLG_Return2 : UInt64;
__imp___NLG_Return : UInt64;
__imp___NLG_Dispatch2 : UInt64;
__imp___IsExceptionObjectToBeDestroyed : UInt64;
__imp___FindAndUnlinkFrame : UInt64;
__imp___EH_prolog : UInt64;
__imp___CreateFrameInfo : UInt64;
{$ENDIF}
implementation
end.

BIN
contrib/LIBC/llmul.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memcmp.x64.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memcmp.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memcpy.x64.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memcpy.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memmove.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memset.x64.o Normal file

Binary file not shown.

BIN
contrib/LIBC/memset.x86.o Normal file

Binary file not shown.

3
contrib/LIBC/pkglibc.bpi Normal file
View File

@ -0,0 +1,3 @@
/* 'pkglibc' Package */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( bplpkglibc.so pkglibc_nonshared.a )

36
contrib/LIBC/pkglibc.dpk Normal file
View File

@ -0,0 +1,36 @@
package pkglibc;
{$R *.res}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DEFINE RELEASE}
{$ENDIF IMPLICITBUILDING}
{$IMPLICITBUILD ON}
requires
rtl;
contains
libc in 'libc.pas';
end.

956
contrib/LIBC/pkglibc.dproj Normal file
View File

@ -0,0 +1,956 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{4BF86541-AFCF-4EAD-AF66-367AE6174BAF}</ProjectGuid>
<MainSource>pkglibc.dpk</MainSource>
<ProjectVersion>19.4</ProjectVersion>
<FrameworkType>None</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
<TargetedPlatforms>131</TargetedPlatforms>
<AppType>Package</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android' and '$(Base)'=='true') or '$(Base_Android)'!=''">
<Base_Android>true</Base_Android>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Base)'=='true') or '$(Base_Android64)'!=''">
<Base_Android64>true</Base_Android64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
<Base_iOSDevice64>true</Base_iOSDevice64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Base)'=='true') or '$(Base_OSX64)'!=''">
<Base_OSX64>true</Base_OSX64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSXARM64' and '$(Base)'=='true') or '$(Base_OSXARM64)'!=''">
<Base_OSXARM64>true</Base_OSXARM64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>..\$(ProductVersion)\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<GenDll>true</GenDll>
<GenPackage>true</GenPackage>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
<SanitizedProjectName>pkglibc</SanitizedProjectName>
<VerInfo_Locale>2052</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<DCC_BAD_GLOBAL_SYMBOL>false</DCC_BAD_GLOBAL_SYMBOL>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar</EnabledSysJars>
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android64)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar</EnabledSysJars>
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<iOS_AppStore1024>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png</iOS_AppStore1024>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSX64)'!=''">
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSXARM64)'!=''">
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="libc.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">pkglibc.dpk</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k280.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp280.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Platforms>
<Platform value="Android">False</Platform>
<Platform value="Android64">False</Platform>
<Platform value="iOSDevice64">False</Platform>
<Platform value="Linux64">True</Platform>
<Platform value="OSX64">False</Platform>
<Platform value="OSXARM64">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\Win64\pkglibc.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>pkglibc.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\pkglibc.bpl" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>pkglibc.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\Win64\pkglibc.bpl" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>pkglibc.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClasses">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon192">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>0</Operation>
</Platform>
<Platform Name="OSXARM64">
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iOS_AppStore1024">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon152">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon167">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_SpotLight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon180">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification60">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting87">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectiOSEntitlements"/>
<DeployClass Name="ProjectiOSInfoPList"/>
<DeployClass Name="ProjectiOSLaunchScreen"/>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug"/>
<DeployClass Name="ProjectOSXEntitlements"/>
<DeployClass Name="ProjectOSXInfoPList"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
</Deployment>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>2020/06/16 10:18:17.000.397,=rtl.dcp</Transaction>
<Transaction>2020/06/16 10:18:43.000.119,D:\Users\YW\Documents\Embarcadero\Studio\Projects\Package1.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\pkglibc.dproj</Transaction>
<Transaction>2020/06/16 10:22:07.000.080,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\Unit1.pas</Transaction>
<Transaction>2020/06/16 10:22:24.000.216,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\libc\Unit1.pas=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\Unit1.pas</Transaction>
<Transaction>2020/06/16 10:22:42.000.105,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\libc\pkglibc.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\pkglibc.dproj</Transaction>
<Transaction>2020/06/16 10:23:03.000.712,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\libc\libc.pas=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\libc\Unit1.pas</Transaction>
<Transaction>2022/04/15 10:09:52.000.440,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libucrt.pas</Transaction>
<Transaction>2022/04/15 12:22:21.000.777,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libgcc.pas</Transaction>
<Transaction>2022/04/17 16:36:03.763,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libgcc.pas=</Transaction>
<Transaction>2022/04/17 16:36:03.813,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libucrt.pas=</Transaction>
</Transactions>
</BorlandProject>

Binary file not shown.

BIN
contrib/LIBC/pkglibc.res Normal file

Binary file not shown.

Binary file not shown.

438
contrib/LIBC/testlibgcc.pas Normal file
View File

@ -0,0 +1,438 @@
unit testlibgcc;
interface
uses SysUtils,libgcc;
procedure test_libgcc;
implementation
procedure test_libgcc;
begin
try
{$IFDEF WIN64}
writeln('__alloca: ',NativeInt(@__alloca));
writeln('___chkstk_ms: ',NativeInt(@___chkstk_ms));
writeln('__multi3: ',NativeInt(@__multi3));
writeln('__negti2: ',NativeInt(@__negti2));
writeln('__lshrti3: ',NativeInt(@__lshrti3));
writeln('__ashlti3: ',NativeInt(@__ashlti3));
writeln('__ashrti3: ',NativeInt(@__ashrti3));
writeln('__cmpti2: ',NativeInt(@__cmpti2));
writeln('__ucmpti2: ',NativeInt(@__ucmpti2));
writeln('__clear_cache: ',NativeInt(@__clear_cache));
writeln('getpagesize: ',NativeInt(@getpagesize));
writeln('__do_global_dtors: ',NativeInt(@__do_global_dtors));
writeln('__absvdi2: ',NativeInt(@__absvdi2));
writeln('__absvti2: ',NativeInt(@__absvti2));
writeln('__addvdi3: ',NativeInt(@__addvdi3));
writeln('__addvti3: ',NativeInt(@__addvti3));
writeln('__subvdi3: ',NativeInt(@__subvdi3));
writeln('__subvti3: ',NativeInt(@__subvti3));
writeln('__mulvdi3: ',NativeInt(@__mulvdi3));
writeln('__mulvti3: ',NativeInt(@__mulvti3));
writeln('__negvdi2: ',NativeInt(@__negvdi2));
writeln('__negvti2: ',NativeInt(@__negvti2));
writeln('__ffsdi2: ',NativeInt(@__ffsdi2));
writeln('__ffsti2: ',NativeInt(@__ffsti2));
writeln('__clzdi2: ',NativeInt(@__clzdi2));
writeln('__clzti2: ',NativeInt(@__clzti2));
writeln('__ctzdi2: ',NativeInt(@__ctzdi2));
writeln('__ctzti2: ',NativeInt(@__ctzti2));
writeln('__popcountdi2: ',NativeInt(@__popcountdi2));
writeln('__popcountti2: ',NativeInt(@__popcountti2));
writeln('__paritydi2: ',NativeInt(@__paritydi2));
writeln('__parityti2: ',NativeInt(@__parityti2));
writeln('__powisf2: ',NativeInt(@__powisf2));
writeln('__powidf2: ',NativeInt(@__powidf2));
writeln('__powixf2: ',NativeInt(@__powixf2));
writeln('__powitf2: ',NativeInt(@__powitf2));
writeln('__mulsc3: ',NativeInt(@__mulsc3));
writeln('__muldc3: ',NativeInt(@__muldc3));
writeln('__mulxc3: ',NativeInt(@__mulxc3));
writeln('__multc3: ',NativeInt(@__multc3));
writeln('__divsc3: ',NativeInt(@__divsc3));
writeln('__divdc3: ',NativeInt(@__divdc3));
writeln('__divxc3: ',NativeInt(@__divxc3));
writeln('__divtc3: ',NativeInt(@__divtc3));
writeln('__bswapsi2: ',NativeInt(@__bswapsi2));
writeln('__bswapdi2: ',NativeInt(@__bswapdi2));
writeln('__clrsbdi2: ',NativeInt(@__clrsbdi2));
writeln('__clrsbti2: ',NativeInt(@__clrsbti2));
writeln('__fixunssfdi: ',NativeInt(@__fixunssfdi));
writeln('__fixunsdfdi: ',NativeInt(@__fixunsdfdi));
writeln('__fixunsxfdi: ',NativeInt(@__fixunsxfdi));
writeln('__fixsfti: ',NativeInt(@__fixsfti));
writeln('__fixdfti: ',NativeInt(@__fixdfti));
writeln('__fixxfti: ',NativeInt(@__fixxfti));
writeln('__fixunssfti: ',NativeInt(@__fixunssfti));
writeln('__fixunsdfti: ',NativeInt(@__fixunsdfti));
writeln('__fixunsxfti: ',NativeInt(@__fixunsxfti));
writeln('__floattisf: ',NativeInt(@__floattisf));
writeln('__floattidf: ',NativeInt(@__floattidf));
writeln('__floattixf: ',NativeInt(@__floattixf));
writeln('__floatuntisf: ',NativeInt(@__floatuntisf));
writeln('__floatuntidf: ',NativeInt(@__floatuntidf));
writeln('__floatuntixf: ',NativeInt(@__floatuntixf));
writeln('__gcc_bcmp: ',NativeInt(@__gcc_bcmp));
writeln('__divti3: ',NativeInt(@__divti3));
writeln('__modti3: ',NativeInt(@__modti3));
writeln('__divmodti4: ',NativeInt(@__divmodti4));
writeln('__udivti3: ',NativeInt(@__udivti3));
writeln('__umodti3: ',NativeInt(@__umodti3));
writeln('__udivmodti4: ',NativeInt(@__udivmodti4));
writeln('__udiv_w_sdiv: ',NativeInt(@__udiv_w_sdiv));
writeln('__dfp_set_round: ',NativeInt(@__dfp_set_round));
writeln('__bid32_to_binary32: ',NativeInt(@__bid32_to_binary32));
writeln('isinfd32: ',NativeInt(@isinfd32));
writeln('isinfd64: ',NativeInt(@isinfd64));
writeln('isinfd128: ',NativeInt(@isinfd128));
writeln('__bid64_isSigned: ',NativeInt(@__bid64_isSigned));
writeln('__bid128_isSigned: ',NativeInt(@__bid128_isSigned));
writeln('__bid_round64_2_18: ',NativeInt(@__bid_round64_2_18));
writeln('__bid64_from_int32: ',NativeInt(@__bid64_from_int32));
writeln('__bid64_add: ',NativeInt(@__bid64_add));
writeln('__bid64dq_add: ',NativeInt(@__bid64dq_add));
writeln('__bid64_mul: ',NativeInt(@__bid64_mul));
writeln('__bid64qq_mul: ',NativeInt(@__bid64qq_mul));
writeln('__bid64_quiet_equal: ',NativeInt(@__bid64_quiet_equal));
writeln('__bid128_quiet_equal: ',NativeInt(@__bid128_quiet_equal));
writeln('__bid32_to_bid64: ',NativeInt(@__bid32_to_bid64));
writeln('__bid32_to_bid128: ',NativeInt(@__bid32_to_bid128));
writeln('__bid64_to_bid128: ',NativeInt(@__bid64_to_bid128));
writeln('__bid64_to_int32_rnint: ',NativeInt(@__bid64_to_int32_rnint));
writeln('__bid64_to_int64_rnint: ',NativeInt(@__bid64_to_int64_rnint));
writeln('__bid64_to_uint32_rnint: ',NativeInt(@__bid64_to_uint32_rnint));
writeln('__bid64_to_uint64_rnint: ',NativeInt(@__bid64_to_uint64_rnint));
writeln('__bid128_to_int32_rnint: ',NativeInt(@__bid128_to_int32_rnint));
writeln('__bid128_to_int64_rnint: ',NativeInt(@__bid128_to_int64_rnint));
writeln('__bid128_to_uint32_rnint: ',NativeInt(@__bid128_to_uint32_rnint));
writeln('__bid128_to_uint64_rnint: ',NativeInt(@__bid128_to_uint64_rnint));
writeln('__bid_addsd3: ',NativeInt(@__bid_addsd3));
writeln('__bid_divsd3: ',NativeInt(@__bid_divsd3));
writeln('__bid_mulsd3: ',NativeInt(@__bid_mulsd3));
writeln('__bid_eqsd2: ',NativeInt(@__bid_eqsd2));
writeln('__bid_nesd2: ',NativeInt(@__bid_nesd2));
writeln('__bid_ltsd2: ',NativeInt(@__bid_ltsd2));
writeln('__bid_gtsd2: ',NativeInt(@__bid_gtsd2));
writeln('__bid_lesd2: ',NativeInt(@__bid_lesd2));
writeln('__bid_gesd2: ',NativeInt(@__bid_gesd2));
writeln('__bid_fixsdsi: ',NativeInt(@__bid_fixsdsi));
writeln('__bid_fixsddi: ',NativeInt(@__bid_fixsddi));
writeln('__bid_fixunssdsi: ',NativeInt(@__bid_fixunssdsi));
writeln('__bid_fixunssddi: ',NativeInt(@__bid_fixunssddi));
writeln('__bid_floatsisd: ',NativeInt(@__bid_floatsisd));
writeln('__bid_floatdisd: ',NativeInt(@__bid_floatdisd));
writeln('__bid_floatunssisd: ',NativeInt(@__bid_floatunssisd));
writeln('__bid_floatunsdisd: ',NativeInt(@__bid_floatunsdisd));
writeln('__bid_truncsdsf: ',NativeInt(@__bid_truncsdsf));
writeln('__bid_extendsddf: ',NativeInt(@__bid_extendsddf));
writeln('__bid_extendsdxf: ',NativeInt(@__bid_extendsdxf));
writeln('__bid_extendsdtf: ',NativeInt(@__bid_extendsdtf));
writeln('__bid_extendsfsd: ',NativeInt(@__bid_extendsfsd));
writeln('__bid_truncdfsd: ',NativeInt(@__bid_truncdfsd));
writeln('__bid_truncxfsd: ',NativeInt(@__bid_truncxfsd));
writeln('__bid_trunctfsd: ',NativeInt(@__bid_trunctfsd));
writeln('__bid_extendsddd2: ',NativeInt(@__bid_extendsddd2));
writeln('__bid_extendsdtd2: ',NativeInt(@__bid_extendsdtd2));
writeln('__bid_unordsd2: ',NativeInt(@__bid_unordsd2));
writeln('__bid_adddd3: ',NativeInt(@__bid_adddd3));
writeln('__bid_divdd3: ',NativeInt(@__bid_divdd3));
writeln('__bid_muldd3: ',NativeInt(@__bid_muldd3));
writeln('__bid_eqdd2: ',NativeInt(@__bid_eqdd2));
writeln('__bid_nedd2: ',NativeInt(@__bid_nedd2));
writeln('__bid_ltdd2: ',NativeInt(@__bid_ltdd2));
writeln('__bid_gtdd2: ',NativeInt(@__bid_gtdd2));
writeln('__bid_ledd2: ',NativeInt(@__bid_ledd2));
writeln('__bid_gedd2: ',NativeInt(@__bid_gedd2));
writeln('__bid_fixddsi: ',NativeInt(@__bid_fixddsi));
writeln('__bid_fixdddi: ',NativeInt(@__bid_fixdddi));
writeln('__bid_fixunsddsi: ',NativeInt(@__bid_fixunsddsi));
writeln('__bid_fixunsdddi: ',NativeInt(@__bid_fixunsdddi));
writeln('__bid_floatsidd: ',NativeInt(@__bid_floatsidd));
writeln('__bid_floatdidd: ',NativeInt(@__bid_floatdidd));
writeln('__bid_floatunssidd: ',NativeInt(@__bid_floatunssidd));
writeln('__bid_floatunsdidd: ',NativeInt(@__bid_floatunsdidd));
writeln('__bid_truncddsf: ',NativeInt(@__bid_truncddsf));
writeln('__bid_truncdddf: ',NativeInt(@__bid_truncdddf));
writeln('__bid_extendddxf: ',NativeInt(@__bid_extendddxf));
writeln('__bid_extendddtf: ',NativeInt(@__bid_extendddtf));
writeln('__bid_extendsfdd: ',NativeInt(@__bid_extendsfdd));
writeln('__bid_extenddfdd: ',NativeInt(@__bid_extenddfdd));
writeln('__bid_truncxfdd: ',NativeInt(@__bid_truncxfdd));
writeln('__bid_trunctfdd: ',NativeInt(@__bid_trunctfdd));
writeln('__bid_truncddsd2: ',NativeInt(@__bid_truncddsd2));
writeln('__bid_extendddtd2: ',NativeInt(@__bid_extendddtd2));
writeln('__bid_unorddd2: ',NativeInt(@__bid_unorddd2));
writeln('__bid_addtd3: ',NativeInt(@__bid_addtd3));
writeln('__bid_divtd3: ',NativeInt(@__bid_divtd3));
writeln('__bid_multd3: ',NativeInt(@__bid_multd3));
writeln('__bid_eqtd2: ',NativeInt(@__bid_eqtd2));
writeln('__bid_netd2: ',NativeInt(@__bid_netd2));
writeln('__bid_lttd2: ',NativeInt(@__bid_lttd2));
writeln('__bid_gttd2: ',NativeInt(@__bid_gttd2));
writeln('__bid_letd2: ',NativeInt(@__bid_letd2));
writeln('__bid_getd2: ',NativeInt(@__bid_getd2));
writeln('__bid_fixtdsi: ',NativeInt(@__bid_fixtdsi));
writeln('__bid_fixtddi: ',NativeInt(@__bid_fixtddi));
writeln('__bid_fixunstdsi: ',NativeInt(@__bid_fixunstdsi));
writeln('__bid_fixunstddi: ',NativeInt(@__bid_fixunstddi));
writeln('__bid_floatsitd: ',NativeInt(@__bid_floatsitd));
writeln('__bid_floatditd: ',NativeInt(@__bid_floatditd));
writeln('__bid_floatunssitd: ',NativeInt(@__bid_floatunssitd));
writeln('__bid_floatunsditd: ',NativeInt(@__bid_floatunsditd));
writeln('__bid_trunctdsf: ',NativeInt(@__bid_trunctdsf));
writeln('__bid_trunctddf: ',NativeInt(@__bid_trunctddf));
writeln('__bid_trunctdxf: ',NativeInt(@__bid_trunctdxf));
writeln('__bid_trunctdtf: ',NativeInt(@__bid_trunctdtf));
writeln('__bid_extendsftd: ',NativeInt(@__bid_extendsftd));
writeln('__bid_extenddftd: ',NativeInt(@__bid_extenddftd));
writeln('__bid_extendxftd: ',NativeInt(@__bid_extendxftd));
writeln('__bid_extendtftd: ',NativeInt(@__bid_extendtftd));
writeln('__bid_trunctdsd2: ',NativeInt(@__bid_trunctdsd2));
writeln('__bid_trunctddd2: ',NativeInt(@__bid_trunctddd2));
writeln('__bid_unordtd2: ',NativeInt(@__bid_unordtd2));
writeln('__sfp_handle_exceptions: ',NativeInt(@__sfp_handle_exceptions));
writeln('__addtf3: ',NativeInt(@__addtf3));
writeln('__divtf3: ',NativeInt(@__divtf3));
writeln('__eqtf2: ',NativeInt(@__eqtf2));
writeln('__netf2: ',NativeInt(@__netf2));
writeln('__getf2: ',NativeInt(@__getf2));
writeln('__gttf2: ',NativeInt(@__gttf2));
writeln('__letf2: ',NativeInt(@__letf2));
writeln('__lttf2: ',NativeInt(@__lttf2));
writeln('__multf3: ',NativeInt(@__multf3));
writeln('__negtf2: ',NativeInt(@__negtf2));
writeln('__subtf3: ',NativeInt(@__subtf3));
writeln('__unordtf2: ',NativeInt(@__unordtf2));
writeln('__fixtfsi: ',NativeInt(@__fixtfsi));
writeln('__fixunstfsi: ',NativeInt(@__fixunstfsi));
writeln('__floatsitf: ',NativeInt(@__floatsitf));
writeln('__floatunsitf: ',NativeInt(@__floatunsitf));
writeln('__fixtfdi: ',NativeInt(@__fixtfdi));
writeln('__fixunstfdi: ',NativeInt(@__fixunstfdi));
writeln('__floatditf: ',NativeInt(@__floatditf));
writeln('__floatunditf: ',NativeInt(@__floatunditf));
writeln('__fixtfti: ',NativeInt(@__fixtfti));
writeln('__fixunstfti: ',NativeInt(@__fixunstfti));
writeln('__floattitf: ',NativeInt(@__floattitf));
writeln('__floatuntitf: ',NativeInt(@__floatuntitf));
writeln('__extendsftf2: ',NativeInt(@__extendsftf2));
writeln('__extenddftf2: ',NativeInt(@__extenddftf2));
writeln('__extendxftf2: ',NativeInt(@__extendxftf2));
writeln('__trunctfsf2: ',NativeInt(@__trunctfsf2));
writeln('__trunctfdf2: ',NativeInt(@__trunctfdf2));
writeln('__trunctfxf2: ',NativeInt(@__trunctfxf2));
writeln('__enable_execute_stack: ',NativeInt(@__enable_execute_stack));
{$ELSE}
writeln('___chkstk: ',NativeInt(@___chkstk));
writeln('__alloca: ',NativeInt(@__alloca));
writeln('___chkstk_ms: ',NativeInt(@___chkstk_ms));
writeln('___muldi3: ',NativeInt(@___muldi3));
writeln('___negdi2: ',NativeInt(@___negdi2));
writeln('___lshrdi3: ',NativeInt(@___lshrdi3));
writeln('___ashldi3: ',NativeInt(@___ashldi3));
writeln('___ashrdi3: ',NativeInt(@___ashrdi3));
writeln('___cmpdi2: ',NativeInt(@___cmpdi2));
writeln('___ucmpdi2: ',NativeInt(@___ucmpdi2));
writeln('___clear_cache: ',NativeInt(@___clear_cache));
writeln('___do_global_dtors: ',NativeInt(@___do_global_dtors));
writeln('___absvsi2: ',NativeInt(@___absvsi2));
writeln('___absvdi2: ',NativeInt(@___absvdi2));
writeln('___addvsi3: ',NativeInt(@___addvsi3));
writeln('___addvdi3: ',NativeInt(@___addvdi3));
writeln('___subvsi3: ',NativeInt(@___subvsi3));
writeln('___subvdi3: ',NativeInt(@___subvdi3));
writeln('___mulvsi3: ',NativeInt(@___mulvsi3));
writeln('___mulvdi3: ',NativeInt(@___mulvdi3));
writeln('___negvsi2: ',NativeInt(@___negvsi2));
writeln('___negvdi2: ',NativeInt(@___negvdi2));
writeln('___ffssi2: ',NativeInt(@___ffssi2));
writeln('___ffsdi2: ',NativeInt(@___ffsdi2));
writeln('___clzsi2: ',NativeInt(@___clzsi2));
writeln('___clzdi2: ',NativeInt(@___clzdi2));
writeln('___ctzsi2: ',NativeInt(@___ctzsi2));
writeln('___ctzdi2: ',NativeInt(@___ctzdi2));
writeln('___popcountsi2: ',NativeInt(@___popcountsi2));
writeln('___popcountdi2: ',NativeInt(@___popcountdi2));
writeln('___paritysi2: ',NativeInt(@___paritysi2));
writeln('___paritydi2: ',NativeInt(@___paritydi2));
writeln('___powisf2: ',NativeInt(@___powisf2));
writeln('___powidf2: ',NativeInt(@___powidf2));
writeln('___powixf2: ',NativeInt(@___powixf2));
writeln('___powitf2: ',NativeInt(@___powitf2));
writeln('___mulsc3: ',NativeInt(@___mulsc3));
writeln('___muldc3: ',NativeInt(@___muldc3));
writeln('___mulxc3: ',NativeInt(@___mulxc3));
writeln('___multc3: ',NativeInt(@___multc3));
writeln('___divsc3: ',NativeInt(@___divsc3));
writeln('___divdc3: ',NativeInt(@___divdc3));
writeln('___divxc3: ',NativeInt(@___divxc3));
writeln('___divtc3: ',NativeInt(@___divtc3));
writeln('___bswapsi2: ',NativeInt(@___bswapsi2));
writeln('___bswapdi2: ',NativeInt(@___bswapdi2));
writeln('___clrsbsi2: ',NativeInt(@___clrsbsi2));
writeln('___clrsbdi2: ',NativeInt(@___clrsbdi2));
writeln('___fixunssfsi: ',NativeInt(@___fixunssfsi));
writeln('___fixunsdfsi: ',NativeInt(@___fixunsdfsi));
writeln('___fixunsxfsi: ',NativeInt(@___fixunsxfsi));
writeln('___fixsfdi: ',NativeInt(@___fixsfdi));
writeln('___fixdfdi: ',NativeInt(@___fixdfdi));
writeln('___fixxfdi: ',NativeInt(@___fixxfdi));
writeln('___fixunssfdi: ',NativeInt(@___fixunssfdi));
writeln('___fixunsdfdi: ',NativeInt(@___fixunsdfdi));
writeln('___fixunsxfdi: ',NativeInt(@___fixunsxfdi));
writeln('___floatdisf: ',NativeInt(@___floatdisf));
writeln('___floatdidf: ',NativeInt(@___floatdidf));
writeln('___floatdixf: ',NativeInt(@___floatdixf));
writeln('___floatundisf: ',NativeInt(@___floatundisf));
writeln('___floatundidf: ',NativeInt(@___floatundidf));
writeln('___floatundixf: ',NativeInt(@___floatundixf));
writeln('___gcc_bcmp: ',NativeInt(@___gcc_bcmp));
writeln('___divdi3: ',NativeInt(@___divdi3));
writeln('___moddi3: ',NativeInt(@___moddi3));
writeln('___divmoddi4: ',NativeInt(@___divmoddi4));
writeln('___udivdi3: ',NativeInt(@___udivdi3));
writeln('___umoddi3: ',NativeInt(@___umoddi3));
writeln('___udivmoddi4: ',NativeInt(@___udivmoddi4));
writeln('___udiv_w_sdiv: ',NativeInt(@___udiv_w_sdiv));
writeln('___dfp_set_round: ',NativeInt(@___dfp_set_round));
writeln('___bid32_to_binary32: ',NativeInt(@___bid32_to_binary32));
writeln('_isinfd32: ',NativeInt(@_isinfd32));
writeln('_isinfd64: ',NativeInt(@_isinfd64));
writeln('_isinfd128: ',NativeInt(@_isinfd128));
writeln('___bid64_isSigned: ',NativeInt(@___bid64_isSigned));
writeln('___bid128_isSigned: ',NativeInt(@___bid128_isSigned));
writeln('___bid_round64_2_18: ',NativeInt(@___bid_round64_2_18));
writeln('___bid64_from_int32: ',NativeInt(@___bid64_from_int32));
writeln('___bid64_add: ',NativeInt(@___bid64_add));
writeln('___bid64dq_add: ',NativeInt(@___bid64dq_add));
writeln('___bid64_mul: ',NativeInt(@___bid64_mul));
writeln('___bid64qq_mul: ',NativeInt(@___bid64qq_mul));
writeln('___bid64_quiet_equal: ',NativeInt(@___bid64_quiet_equal));
writeln('___bid128_quiet_equal: ',NativeInt(@___bid128_quiet_equal));
writeln('___bid32_to_bid64: ',NativeInt(@___bid32_to_bid64));
writeln('___bid32_to_bid128: ',NativeInt(@___bid32_to_bid128));
writeln('___bid64_to_bid128: ',NativeInt(@___bid64_to_bid128));
writeln('___bid64_to_int32_rnint: ',NativeInt(@___bid64_to_int32_rnint));
writeln('___bid64_to_int64_rnint: ',NativeInt(@___bid64_to_int64_rnint));
writeln('___bid64_to_uint32_rnint: ',NativeInt(@___bid64_to_uint32_rnint));
writeln('___bid64_to_uint64_rnint: ',NativeInt(@___bid64_to_uint64_rnint));
writeln('___bid128_to_int32_rnint: ',NativeInt(@___bid128_to_int32_rnint));
writeln('___bid128_to_int64_rnint: ',NativeInt(@___bid128_to_int64_rnint));
writeln('___bid128_to_uint32_rnint: ',NativeInt(@___bid128_to_uint32_rnint));
writeln('___bid128_to_uint64_rnint: ',NativeInt(@___bid128_to_uint64_rnint));
writeln('___bid_addsd3: ',NativeInt(@___bid_addsd3));
writeln('___bid_divsd3: ',NativeInt(@___bid_divsd3));
writeln('___bid_mulsd3: ',NativeInt(@___bid_mulsd3));
writeln('___bid_eqsd2: ',NativeInt(@___bid_eqsd2));
writeln('___bid_nesd2: ',NativeInt(@___bid_nesd2));
writeln('___bid_ltsd2: ',NativeInt(@___bid_ltsd2));
writeln('___bid_gtsd2: ',NativeInt(@___bid_gtsd2));
writeln('___bid_lesd2: ',NativeInt(@___bid_lesd2));
writeln('___bid_gesd2: ',NativeInt(@___bid_gesd2));
writeln('___bid_fixsdsi: ',NativeInt(@___bid_fixsdsi));
writeln('___bid_fixsddi: ',NativeInt(@___bid_fixsddi));
writeln('___bid_fixunssdsi: ',NativeInt(@___bid_fixunssdsi));
writeln('___bid_fixunssddi: ',NativeInt(@___bid_fixunssddi));
writeln('___bid_floatsisd: ',NativeInt(@___bid_floatsisd));
writeln('___bid_floatdisd: ',NativeInt(@___bid_floatdisd));
writeln('___bid_floatunssisd: ',NativeInt(@___bid_floatunssisd));
writeln('___bid_floatunsdisd: ',NativeInt(@___bid_floatunsdisd));
writeln('___bid_truncsdsf: ',NativeInt(@___bid_truncsdsf));
writeln('___bid_extendsddf: ',NativeInt(@___bid_extendsddf));
writeln('___bid_extendsdxf: ',NativeInt(@___bid_extendsdxf));
writeln('___bid_extendsdtf: ',NativeInt(@___bid_extendsdtf));
writeln('___bid_extendsfsd: ',NativeInt(@___bid_extendsfsd));
writeln('___bid_truncdfsd: ',NativeInt(@___bid_truncdfsd));
writeln('___bid_truncxfsd: ',NativeInt(@___bid_truncxfsd));
writeln('___bid_trunctfsd: ',NativeInt(@___bid_trunctfsd));
writeln('___bid_extendsddd2: ',NativeInt(@___bid_extendsddd2));
writeln('___bid_extendsdtd2: ',NativeInt(@___bid_extendsdtd2));
writeln('___bid_unordsd2: ',NativeInt(@___bid_unordsd2));
writeln('___bid_adddd3: ',NativeInt(@___bid_adddd3));
writeln('___bid_divdd3: ',NativeInt(@___bid_divdd3));
writeln('___bid_muldd3: ',NativeInt(@___bid_muldd3));
writeln('___bid_eqdd2: ',NativeInt(@___bid_eqdd2));
writeln('___bid_nedd2: ',NativeInt(@___bid_nedd2));
writeln('___bid_ltdd2: ',NativeInt(@___bid_ltdd2));
writeln('___bid_gtdd2: ',NativeInt(@___bid_gtdd2));
writeln('___bid_ledd2: ',NativeInt(@___bid_ledd2));
writeln('___bid_gedd2: ',NativeInt(@___bid_gedd2));
writeln('___bid_fixddsi: ',NativeInt(@___bid_fixddsi));
writeln('___bid_fixdddi: ',NativeInt(@___bid_fixdddi));
writeln('___bid_fixunsddsi: ',NativeInt(@___bid_fixunsddsi));
writeln('___bid_fixunsdddi: ',NativeInt(@___bid_fixunsdddi));
writeln('___bid_floatsidd: ',NativeInt(@___bid_floatsidd));
writeln('___bid_floatdidd: ',NativeInt(@___bid_floatdidd));
writeln('___bid_floatunssidd: ',NativeInt(@___bid_floatunssidd));
writeln('___bid_floatunsdidd: ',NativeInt(@___bid_floatunsdidd));
writeln('___bid_truncddsf: ',NativeInt(@___bid_truncddsf));
writeln('___bid_truncdddf: ',NativeInt(@___bid_truncdddf));
writeln('___bid_extendddxf: ',NativeInt(@___bid_extendddxf));
writeln('___bid_extendddtf: ',NativeInt(@___bid_extendddtf));
writeln('___bid_extendsfdd: ',NativeInt(@___bid_extendsfdd));
writeln('___bid_extenddfdd: ',NativeInt(@___bid_extenddfdd));
writeln('___bid_truncxfdd: ',NativeInt(@___bid_truncxfdd));
writeln('___bid_trunctfdd: ',NativeInt(@___bid_trunctfdd));
writeln('___bid_truncddsd2: ',NativeInt(@___bid_truncddsd2));
writeln('___bid_extendddtd2: ',NativeInt(@___bid_extendddtd2));
writeln('___bid_unorddd2: ',NativeInt(@___bid_unorddd2));
writeln('___bid_addtd3: ',NativeInt(@___bid_addtd3));
writeln('___bid_divtd3: ',NativeInt(@___bid_divtd3));
writeln('___bid_multd3: ',NativeInt(@___bid_multd3));
writeln('___bid_eqtd2: ',NativeInt(@___bid_eqtd2));
writeln('___bid_netd2: ',NativeInt(@___bid_netd2));
writeln('___bid_lttd2: ',NativeInt(@___bid_lttd2));
writeln('___bid_gttd2: ',NativeInt(@___bid_gttd2));
writeln('___bid_letd2: ',NativeInt(@___bid_letd2));
writeln('___bid_getd2: ',NativeInt(@___bid_getd2));
writeln('___bid_fixtdsi: ',NativeInt(@___bid_fixtdsi));
writeln('___bid_fixtddi: ',NativeInt(@___bid_fixtddi));
writeln('___bid_fixunstdsi: ',NativeInt(@___bid_fixunstdsi));
writeln('___bid_fixunstddi: ',NativeInt(@___bid_fixunstddi));
writeln('___bid_floatsitd: ',NativeInt(@___bid_floatsitd));
writeln('___bid_floatditd: ',NativeInt(@___bid_floatditd));
writeln('___bid_floatunssitd: ',NativeInt(@___bid_floatunssitd));
writeln('___bid_floatunsditd: ',NativeInt(@___bid_floatunsditd));
writeln('___bid_trunctdsf: ',NativeInt(@___bid_trunctdsf));
writeln('___bid_trunctddf: ',NativeInt(@___bid_trunctddf));
writeln('___bid_trunctdxf: ',NativeInt(@___bid_trunctdxf));
writeln('___bid_trunctdtf: ',NativeInt(@___bid_trunctdtf));
writeln('___bid_extendsftd: ',NativeInt(@___bid_extendsftd));
writeln('___bid_extenddftd: ',NativeInt(@___bid_extenddftd));
writeln('___bid_extendxftd: ',NativeInt(@___bid_extendxftd));
writeln('___bid_extendtftd: ',NativeInt(@___bid_extendtftd));
writeln('___bid_trunctdsd2: ',NativeInt(@___bid_trunctdsd2));
writeln('___bid_trunctddd2: ',NativeInt(@___bid_trunctddd2));
writeln('___bid_unordtd2: ',NativeInt(@___bid_unordtd2));
writeln('___copysigntf3: ',NativeInt(@___copysigntf3));
writeln('___sfp_handle_exceptions: ',NativeInt(@___sfp_handle_exceptions));
writeln('___addtf3: ',NativeInt(@___addtf3));
writeln('___divtf3: ',NativeInt(@___divtf3));
writeln('___eqtf2: ',NativeInt(@___eqtf2));
writeln('___netf2: ',NativeInt(@___netf2));
writeln('___getf2: ',NativeInt(@___getf2));
writeln('___gttf2: ',NativeInt(@___gttf2));
writeln('___letf2: ',NativeInt(@___letf2));
writeln('___lttf2: ',NativeInt(@___lttf2));
writeln('___multf3: ',NativeInt(@___multf3));
writeln('___negtf2: ',NativeInt(@___negtf2));
writeln('___subtf3: ',NativeInt(@___subtf3));
writeln('___unordtf2: ',NativeInt(@___unordtf2));
writeln('___fixtfsi: ',NativeInt(@___fixtfsi));
writeln('___fixunstfsi: ',NativeInt(@___fixunstfsi));
writeln('___floatsitf: ',NativeInt(@___floatsitf));
writeln('___floatunsitf: ',NativeInt(@___floatunsitf));
writeln('___fixtfdi: ',NativeInt(@___fixtfdi));
writeln('___fixunstfdi: ',NativeInt(@___fixunstfdi));
writeln('___floatditf: ',NativeInt(@___floatditf));
writeln('___floatunditf: ',NativeInt(@___floatunditf));
writeln('___extendsftf2: ',NativeInt(@___extendsftf2));
writeln('___extenddftf2: ',NativeInt(@___extenddftf2));
writeln('___extendxftf2: ',NativeInt(@___extendxftf2));
writeln('___trunctfsf2: ',NativeInt(@___trunctfsf2));
writeln('___trunctfdf2: ',NativeInt(@___trunctfdf2));
writeln('___trunctfxf2: ',NativeInt(@___trunctfxf2));
{$ENDIF}
except
on E : Exception do Writeln(E.ClassName,': ',E.Message);
end;
end;
end.

File diff suppressed because it is too large Load Diff

5191
contrib/LIBC/testlibucrt.pas Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,164 @@
unit testlibvcruntime140;
interface
uses SysUtils,libvcruntime140;
procedure test_libvcruntime140;
implementation
procedure test_libvcruntime140;
begin
try
{$IFDEF WIN64}
writeln('wcsstr: ',NativeInt(@wcsstr));
writeln('wcsrchr: ',NativeInt(@wcsrchr));
writeln('wcschr: ',NativeInt(@wcschr));
writeln('unexpected: ',NativeInt(@unexpected));
writeln('strstr: ',NativeInt(@strstr));
writeln('strrchr: ',NativeInt(@strrchr));
writeln('strchr: ',NativeInt(@strchr));
writeln('set_unexpected: ',NativeInt(@set_unexpected));
writeln('memset: ',NativeInt(@memset));
writeln('memmove: ',NativeInt(@memmove));
writeln('memcpy: ',NativeInt(@memcpy));
writeln('memcmp: ',NativeInt(@memcmp));
writeln('memchr: ',NativeInt(@memchr));
writeln('longjmp: ',NativeInt(@longjmp));
writeln('_set_se_translator: ',NativeInt(@_set_se_translator));
writeln('_set_purecall_handler: ',NativeInt(@_set_purecall_handler));
writeln('_purecall: ',NativeInt(@_purecall));
writeln('_local_unwind: ',NativeInt(@_local_unwind));
writeln('_is_exception_typeof: ',NativeInt(@_is_exception_typeof));
writeln('_get_unexpected: ',NativeInt(@_get_unexpected));
writeln('_get_purecall_handler: ',NativeInt(@_get_purecall_handler));
writeln('__vcrt_LoadLibraryExW: ',NativeInt(@__vcrt_LoadLibraryExW));
writeln('__vcrt_InitializeCriticalSectionEx: ',NativeInt(@__vcrt_InitializeCriticalSectionEx));
writeln('__vcrt_GetModuleHandleW: ',NativeInt(@__vcrt_GetModuleHandleW));
writeln('__vcrt_GetModuleFileNameW: ',NativeInt(@__vcrt_GetModuleFileNameW));
writeln('__uncaught_exceptions: ',NativeInt(@__uncaught_exceptions));
writeln('__uncaught_exception: ',NativeInt(@__uncaught_exception));
writeln('__unDNameEx: ',NativeInt(@__unDNameEx));
writeln('__unDName: ',NativeInt(@__unDName));
writeln('__telemetry_main_return_trigger: ',NativeInt(@__telemetry_main_return_trigger));
writeln('__telemetry_main_invoke_trigger: ',NativeInt(@__telemetry_main_invoke_trigger));
writeln('__std_type_info_name: ',NativeInt(@__std_type_info_name));
writeln('__std_type_info_hash: ',NativeInt(@__std_type_info_hash));
writeln('__std_type_info_destroy_list: ',NativeInt(@__std_type_info_destroy_list));
writeln('__std_type_info_compare: ',NativeInt(@__std_type_info_compare));
writeln('__std_terminate: ',NativeInt(@__std_terminate));
writeln('__std_exception_destroy: ',NativeInt(@__std_exception_destroy));
writeln('__std_exception_copy: ',NativeInt(@__std_exception_copy));
writeln('__report_gsfailure: ',NativeInt(@__report_gsfailure));
writeln('__processing_throw: ',NativeInt(@__processing_throw));
writeln('__intrinsic_setjmpex: ',NativeInt(@__intrinsic_setjmpex));
writeln('__intrinsic_setjmp: ',NativeInt(@__intrinsic_setjmp));
writeln('__current_exception_context: ',NativeInt(@__current_exception_context));
writeln('__current_exception: ',NativeInt(@__current_exception));
writeln('__TypeMatch: ',NativeInt(@__TypeMatch));
writeln('__RTtypeid: ',NativeInt(@__RTtypeid));
writeln('__RTDynamicCast: ',NativeInt(@__RTDynamicCast));
writeln('__RTCastToVoid: ',NativeInt(@__RTCastToVoid));
writeln('__NLG_Return2: ',NativeInt(@__NLG_Return2));
writeln('__NLG_Dispatch2: ',NativeInt(@__NLG_Dispatch2));
writeln('__GetPlatformExceptionInfo: ',NativeInt(@__GetPlatformExceptionInfo));
writeln('__FrameUnwindFilter: ',NativeInt(@__FrameUnwindFilter));
writeln('__DestructExceptionObject: ',NativeInt(@__DestructExceptionObject));
writeln('__CxxUnregisterExceptionObject: ',NativeInt(@__CxxUnregisterExceptionObject));
writeln('__CxxRegisterExceptionObject: ',NativeInt(@__CxxRegisterExceptionObject));
writeln('__CxxQueryExceptionSize: ',NativeInt(@__CxxQueryExceptionSize));
writeln('__CxxFrameHandler3: ',NativeInt(@__CxxFrameHandler3));
writeln('__CxxFrameHandler2: ',NativeInt(@__CxxFrameHandler2));
writeln('__CxxFrameHandler: ',NativeInt(@__CxxFrameHandler));
writeln('__CxxExceptionFilter: ',NativeInt(@__CxxExceptionFilter));
writeln('__CxxDetectRethrow: ',NativeInt(@__CxxDetectRethrow));
writeln('__C_specific_handler_noexcept: ',NativeInt(@__C_specific_handler_noexcept));
writeln('__C_specific_handler: ',NativeInt(@__C_specific_handler));
writeln('__BuildCatchObjectHelper: ',NativeInt(@__BuildCatchObjectHelper));
writeln('__BuildCatchObject: ',NativeInt(@__BuildCatchObject));
writeln('__AdjustPointer: ',NativeInt(@__AdjustPointer));
writeln('_SetWinRTOutOfMemoryExceptionCallback: ',NativeInt(@_SetWinRTOutOfMemoryExceptionCallback));
writeln('_IsExceptionObjectToBeDestroyed: ',NativeInt(@_IsExceptionObjectToBeDestroyed));
writeln('_FindAndUnlinkFrame: ',NativeInt(@_FindAndUnlinkFrame));
writeln('_CxxThrowException: ',NativeInt(@_CxxThrowException));
writeln('_CreateFrameInfo: ',NativeInt(@_CreateFrameInfo));
{$ELSE}
writeln('_wcsstr: ',NativeInt(@_wcsstr));
writeln('_wcsrchr: ',NativeInt(@_wcsrchr));
writeln('_wcschr: ',NativeInt(@_wcschr));
writeln('_unexpected: ',NativeInt(@_unexpected));
writeln('_strstr: ',NativeInt(@_strstr));
writeln('_strrchr: ',NativeInt(@_strrchr));
writeln('_strchr: ',NativeInt(@_strchr));
writeln('_set_unexpected: ',NativeInt(@_set_unexpected));
writeln('_memset: ',NativeInt(@_memset));
writeln('_memmove: ',NativeInt(@_memmove));
writeln('_memcpy: ',NativeInt(@_memcpy));
writeln('_memcmp: ',NativeInt(@_memcmp));
writeln('_memchr: ',NativeInt(@_memchr));
writeln('_longjmp: ',NativeInt(@_longjmp));
writeln('__setjmp3: ',NativeInt(@__setjmp3));
writeln('__set_se_translator: ',NativeInt(@__set_se_translator));
writeln('__set_purecall_handler: ',NativeInt(@__set_purecall_handler));
writeln('__purecall: ',NativeInt(@__purecall));
writeln('__longjmpex: ',NativeInt(@__longjmpex));
writeln('__local_unwind4: ',NativeInt(@__local_unwind4));
writeln('__local_unwind2: ',NativeInt(@__local_unwind2));
writeln('__is_exception_typeof: ',NativeInt(@__is_exception_typeof));
writeln('__global_unwind2: ',NativeInt(@__global_unwind2));
writeln('__get_unexpected: ',NativeInt(@__get_unexpected));
writeln('__get_purecall_handler: ',NativeInt(@__get_purecall_handler));
writeln('__except_handler4_common: ',NativeInt(@__except_handler4_common));
writeln('__except_handler3: ',NativeInt(@__except_handler3));
writeln('__except_handler2: ',NativeInt(@__except_handler2));
writeln('__chkesp: ',NativeInt(@__chkesp));
writeln('___vcrt_LoadLibraryExW: ',NativeInt(@___vcrt_LoadLibraryExW));
writeln('___vcrt_InitializeCriticalSectionEx: ',NativeInt(@___vcrt_InitializeCriticalSectionEx));
writeln('___vcrt_GetModuleHandleW: ',NativeInt(@___vcrt_GetModuleHandleW));
writeln('___vcrt_GetModuleFileNameW: ',NativeInt(@___vcrt_GetModuleFileNameW));
writeln('___uncaught_exceptions: ',NativeInt(@___uncaught_exceptions));
writeln('___uncaught_exception: ',NativeInt(@___uncaught_exception));
writeln('___unDNameEx: ',NativeInt(@___unDNameEx));
writeln('___unDName: ',NativeInt(@___unDName));
writeln('___telemetry_main_return_trigger: ',NativeInt(@___telemetry_main_return_trigger));
writeln('___telemetry_main_invoke_trigger: ',NativeInt(@___telemetry_main_invoke_trigger));
writeln('___std_type_info_name: ',NativeInt(@___std_type_info_name));
writeln('___std_type_info_hash: ',NativeInt(@___std_type_info_hash));
writeln('___std_type_info_destroy_list: ',NativeInt(@___std_type_info_destroy_list));
writeln('___std_type_info_compare: ',NativeInt(@___std_type_info_compare));
writeln('___std_terminate: ',NativeInt(@___std_terminate));
writeln('___std_exception_destroy: ',NativeInt(@___std_exception_destroy));
writeln('___std_exception_copy: ',NativeInt(@___std_exception_copy));
writeln('___report_gsfailure: ',NativeInt(@___report_gsfailure));
writeln('___processing_throw: ',NativeInt(@___processing_throw));
writeln('___intrinsic_setjmp: ',NativeInt(@___intrinsic_setjmp));
writeln('___current_exception_context: ',NativeInt(@___current_exception_context));
writeln('___current_exception: ',NativeInt(@___current_exception));
writeln('___TypeMatch: ',NativeInt(@___TypeMatch));
writeln('___RTtypeid: ',NativeInt(@___RTtypeid));
writeln('___RTDynamicCast: ',NativeInt(@___RTDynamicCast));
writeln('___RTCastToVoid: ',NativeInt(@___RTCastToVoid));
writeln('___GetPlatformExceptionInfo: ',NativeInt(@___GetPlatformExceptionInfo));
writeln('___FrameUnwindFilter: ',NativeInt(@___FrameUnwindFilter));
writeln('___DestructExceptionObject: ',NativeInt(@___DestructExceptionObject));
writeln('___CxxUnregisterExceptionObject: ',NativeInt(@___CxxUnregisterExceptionObject));
writeln('___CxxRegisterExceptionObject: ',NativeInt(@___CxxRegisterExceptionObject));
writeln('___CxxQueryExceptionSize: ',NativeInt(@___CxxQueryExceptionSize));
writeln('___CxxFrameHandler3: ',NativeInt(@___CxxFrameHandler3));
writeln('___CxxFrameHandler2: ',NativeInt(@___CxxFrameHandler2));
writeln('___CxxFrameHandler: ',NativeInt(@___CxxFrameHandler));
writeln('___CxxExceptionFilter: ',NativeInt(@___CxxExceptionFilter));
writeln('___CxxDetectRethrow: ',NativeInt(@___CxxDetectRethrow));
writeln('___BuildCatchObjectHelper: ',NativeInt(@___BuildCatchObjectHelper));
writeln('___BuildCatchObject: ',NativeInt(@___BuildCatchObject));
writeln('___AdjustPointer: ',NativeInt(@___AdjustPointer));
writeln('__SetWinRTOutOfMemoryExceptionCallback: ',NativeInt(@__SetWinRTOutOfMemoryExceptionCallback));
writeln('__NLG_Return2: ',NativeInt(@__NLG_Return2));
writeln('__NLG_Return: ',NativeInt(@__NLG_Return));
writeln('__NLG_Dispatch2: ',NativeInt(@__NLG_Dispatch2));
writeln('__IsExceptionObjectToBeDestroyed: ',NativeInt(@__IsExceptionObjectToBeDestroyed));
writeln('__FindAndUnlinkFrame: ',NativeInt(@__FindAndUnlinkFrame));
writeln('__EH_prolog: ',NativeInt(@__EH_prolog));
writeln('__CreateFrameInfo: ',NativeInt(@__CreateFrameInfo));
{$ENDIF}
except
on E : Exception do Writeln(E.ClassName,': ',E.Message);
end;
end;
end.

21
contrib/LIBC/testucrt.dpr Normal file
View File

@ -0,0 +1,21 @@
program testucrt;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
libgcc in 'libgcc.pas',
testlibgcc in 'testlibgcc.pas';
begin
try
{ TODO -oUser -cConsole Main : Insert code here }
test_libgcc;
readln;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.

1080
contrib/LIBC/testucrt.dproj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>1899/12/30 00:00:00.000.157,=C:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.596,=C:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>1899/12/30 00:00:00.000.680,=C:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/04/24 23:50:32.000.328,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/04/26 01:15:08.000.033,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/05/03 10:43:39.000.280,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/05/16 22:31:10.000.241,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/07/10 20:20:16.000.151,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/08/03 13:20:55.000.938,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/08/27 01:11:51.000.854,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/10/24 11:19:25.000.828,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2019/12/12 16:39:55.000.737,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/04/08 13:06:27.000.170,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/05/01 17:35:37.000.296,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/05/01 17:53:21.000.989,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/05/01 17:59:06.000.707,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/05/08 01:21:22.000.549,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/05/20 01:42:41.000.362,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/06/10 10:39:06.000.314,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/07/17 20:09:31.000.050,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/07/20 18:01:04.000.080,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2020/12/08 22:12:28.000.722,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2020/12/08 22:13:36.000.368,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2021/07/06 12:33:04.000.158,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2021/08/27 15:32:19.000.611,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2021/12/15 01:20:45.000.206,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/01/07 20:18:22.000.353,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/19 01:21:32.000.940,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/19 22:56:28.000.170,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/21 17:17:07.000.537,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/21 21:12:56.000.622,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/22 17:09:11.000.369,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/23 02:13:02.000.497,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/23 02:14:08.000.449,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/23 02:37:50.000.699,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/03/24 20:58:17.000.488,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/04/08 11:49:19.000.209,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/04/08 13:06:44.000.204,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/04/08 20:53:18.000.172,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/04/09 11:11:16.000.067,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction>
<Transaction>2022/04/14 20:23:40.000.390,D:\Users\YW\Documents\Embarcadero\Studio\Projects\Project1.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testucrt.dproj</Transaction>
<Transaction>2022/04/14 20:23:52.000.769,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libmsvcrt.pas</Transaction>
<Transaction>2022/04/14 20:24:50.000.186,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibmsvcrt.pas</Transaction>
<Transaction>2022/04/14 20:59:07.000.736,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibvcruntime140.pas</Transaction>
<Transaction>2022/04/14 20:59:07.000.720,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libvcruntime140.pas</Transaction>
<Transaction>2022/04/14 21:00:27.000.751,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibvcruntime140.pas=</Transaction>
<Transaction>2022/04/14 21:00:27.000.711,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libvcruntime140.pas=</Transaction>
<Transaction>2022/04/15 01:46:00.000.287,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibmsvcrt.pas=</Transaction>
<Transaction>2022/04/15 01:46:00.000.224,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libmsvcrt.pas=</Transaction>
<Transaction>2022/04/15 01:46:17.000.280,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libucrt.pas</Transaction>
<Transaction>2022/04/15 01:46:17.000.484,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibucrt.pas</Transaction>
<Transaction>2022/04/15 11:15:34.772,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libucrt.pas=</Transaction>
<Transaction>2022/04/15 11:15:34.821,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibucrt.pas=</Transaction>
<Transaction>2022/04/15 11:16:14.544,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\libgcc.pas</Transaction>
<Transaction>2022/04/15 11:16:14.747,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\LIBC\testlibgcc.pas</Transaction>
</Transactions>
<ActiveMobileDevice>
<NoProfile iOSSimulator="iPhone5" Android="Android6_API23"/>
</ActiveMobileDevice>
</BorlandProject>

Binary file not shown.

BIN
contrib/LIBC/testucrt.res Normal file

Binary file not shown.

BIN
contrib/LIBC/udivdi3.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/ulldiv.x86.o Normal file

Binary file not shown.

BIN
contrib/LIBC/ullshr.x86.o Normal file

Binary file not shown.

69
contrib/LZ4Delphi/.gitignore vendored Normal file
View File

@ -0,0 +1,69 @@
# Uncomment these types if you want even more clean repository. But be careful.
# It can make harm to an existing project source. Read explanations below.
#
# Resource files are binaries containing manifest, project icon and version info.
# They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files.
#*.res
#
# Type library file (binary). In old Delphi versions it should be stored.
# Since Delphi 2009 it is produced from .ridl file and can safely be ignored.
#*.tlb
#
# Diagram Portfolio file. Used by the diagram editor up to Delphi 7.
# Uncomment this if you are not using diagrams or use newer Delphi version.
#*.ddp
#
# Visual LiveBindings file. Added in Delphi XE2.
# Uncomment this if you are not using LiveBindings Designer.
#*.vlb
#
# Deployment Manager configuration file for your project. Added in Delphi XE2.
# Uncomment this if it is not mobile development and you do not use remote debug feature.
#*.deployproj
#
# C++ object files produced when C/C++ Output file generation is configured.
# Uncomment this if you are not using external objects (zlib library for example).
#*.obj
#
# Delphi compiler-generated binaries (safe to delete)
*.exe
*.dll
*.bpl
*.bpi
*.dcp
*.so
*.apk
*.drc
*.map
*.dres
*.rsm
*.tds
*.dcu
*.lib
*.a
*.o
*.ocx
# Delphi autogenerated files (duplicated info)
*.cfg
*.hpp
*Resource.rc
# Delphi local files (user-specific info)
*.local
*.identcache
*.projdata
*.tvsconfig
*.dsk
# Delphi history and backups
__history/
__recovery/
*.~*
# Castalia statistics file (since XE7 Castalia is distributed with Delphi)
*.stat
# Boss dependency manager vendor folder https://github.com/HashLoad/boss
modules/

403
contrib/LZ4Delphi/LZ4.pas Normal file
View File

@ -0,0 +1,403 @@
unit LZ4;
interface
uses classes, sysutils, LZ4Lib
{$IFDEF YWRTL},YWTypes{$ENDIF};
const
LZ4_VERSION_MAJOR = LZ4Lib.LZ4_VERSION_MAJOR;
LZ4_VERSION_MINOR = LZ4Lib.LZ4_VERSION_MINOR;
LZ4_VERSION_RELEASE = LZ4Lib.LZ4_VERSION_RELEASE;
LZ4_VERSION_NUMBER = LZ4_VERSION_MAJOR*100*100+LZ4_VERSION_MINOR*100+
LZ4_VERSION_RELEASE;
LZ4_VERSION_STRING = '1.9.3';
LZ4HC_CLEVEL_DEFAULT = LZ4Lib.LZ4HC_CLEVEL_DEFAULT;
type
LZ4_Buffer = record
src : Pointer;
size, pos : NativeInt;
end;
LZ4_outBuffer = record
dst : Pointer;
size, pos : NativeInt;
end;
TCustomLZ4Stream = class(TStream)
private
FStream: TStream;
FStreamStartPos: Int64;
FStreamPos: Int64;
_buf : Pointer;
_bufPos : NativeUInt;
total_in, total_out : NativeInt;
public
constructor Create(stream: TStream);
destructor Destroy; override;
end;
TLZ4CompressStream=class(TCustomLZ4Stream)
private
pref : LZ4F_preferences_t;
CCTX : PLZ4F_cctx;
function GetCompressionRate: Single;
procedure DoCompress(buf : Pointer);
public
constructor Create(dest: TStream; compressionLevel: Integer=2);
function Read(var buffer; count: Longint): Longint; override;
function Write(const buffer; count: Longint): Longint; override;
function Read(Buffer: TBytes; Offset, Count: Longint): Longint; override;
function Write(const Buffer: TBytes; Offset: Longint=0; Count:Longint =-1): Longint; override;
destructor Destroy; override;
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
property CompressionRate: Single read GetCompressionRate;
end;
TLZ4DecompressStream = class(TCustomLZ4Stream)
private
FOwnsStream: Boolean;
_eof : boolean;
_bufSize : NativeUInt;
DCTX : PLZ4F_dctx;
public
constructor Create(source: TStream; OwnsStream: Boolean=false);
destructor Destroy; override;
function Read(var buffer; count: Longint): Longint; override;
function Write(const buffer; count: Longint): Longint; override;
function Read(Buffer: TBytes; Offset:LongInt=0;Count: Longint=-1): Longint; override;
function Write(const Buffer: TBytes; Offset, Count: Longint): Longint; override;
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
end;
function CompressData(source : Pointer;srcSize:NativeInt; dst:Pointer;
dstCapacity:NativeInt; compressionLevel:integer=2):NativeInt; overload;
function DecompressData(Source:Pointer;srcSize:NativeInt;dst:Pointer;
dstCapacity:NativeInt):NativeInt; overload;
function CompressData(source :TBytes;index:NativeInt=0;size:NativeInt=-1;
compressionLevel:integer=2):TBytes; overload;
function DecompressData(Source:TBytes;index:NativeInt=0;Size:NativeInt=-1):TBytes; overload;
implementation
uses libc;
type
Context = record
class var _DCTX:PLZ4F_dctx;
class var _CCTX:PLZ4F_cctx;
class function GetDCTX:PLZ4F_dctx; inline; static;
class procedure FreeDCTX(C : PLZ4F_dctx); inline; static;
class function GetCCTX:PLZ4F_cctx; inline; static;
class procedure FreeCCTX(C : PLZ4F_cctx); inline; static;
class constructor Create;
class destructor Destroy;
end;
var
[volatile]_state : Pointer;
function GetBuffer : Pointer; inline;
begin
{$IFDEF YWRTL}Result:=BufferPool256K.GetBuffer{$ELSE}GetMem(Result,256*1024){$ENDIF};
end;
procedure FreeBuffer(b : Pointer); inline;
begin
{$IFDEF YWRTL}BufferPool256K.FreeBuffer(b){$ELSE}Freemem(b){$ENDIF};
end;
function GetBuffer512:Pointer;inline;
begin
{$IFDEF YWRTL}
Result := BufferPool512K.GetBuffer
{$ELSE}
GetMem(Result,512*1024);
{$ENDIF}
end;
procedure FreeBuffer512(var b : Pointer); inline;
begin
{$IFDEF YWRTL}
BufferPool512K.FreeBuffer(b)
{$ELSE}
FreeMem(b);
{$ENDIF}
end;
function CompressData(source : Pointer;srcSize:NativeInt; dst:Pointer;
dstCapacity:NativeInt; compressionLevel:integer=2):NativeInt; overload;
begin
var P := LZ4F_INIT_PREFERENCES;
P. compressionLevel :=compressionLevel;
Result := LZ4F_compressFrame(dst,dstCapacity,source,srcSize,@P);
if LZ4F_isError(Result)<>0 then raise Exception.Create(LZ4F_getErrorName(Result));
end;
function CompressData(source :TBytes;index:NativeInt=0;size:NativeInt=-1;compressionLevel:integer=2):TBytes;
overload;
begin
if size=-1 then size := Length(source);
if size=0 then exit(nil);
var P := LZ4F_INIT_PREFERENCES;
P. compressionLevel :=compressionLevel;
var s := LZ4F_compressFrameBound(size,@P);
SetLength(Result,s);
s := LZ4F_compressFrame(@Result[0],s,@source[index],Size,@P);
if s>0 then SetLength(Result,s)
else Result := nil;
end;
function DecompressData(Source:Pointer;srcSize:NativeInt;dst:Pointer;
dstCapacity:NativeInt):NativeInt; overload;
var TX : PLZ4F_dctx;
ds,ss,r : NativeUInt;
s,d : PByte;
begin
TX := Context.GetDCTX;
Result := 0;
try
s := Source; d := dst;
repeat
ds := dstCapacity;
ss := srcSize;
r := LZ4F_decompress(TX,d,@ds,s,@ss,nil);
if LZ4F_isError(r)<>0 then exit(-abs(r));
inc(Result,ds);
dec(dstCapacity,ds);
dec(srcSize,ss);
s := s+ss;
d := d+ds;
until (dstCapacity=0)or(srcSize=0);
finally
Context.FreeDCTX(TX);
end;
end;
function DecompressData(Source:TBytes;index:NativeInt=0;Size:NativeInt=-1):TBytes; overload;
var s : Nativeint;
begin
if Size=-1 then Size := Length(Source);
SetLength(Result,Size*32);
s := DecompressData(@Source[Index],Size,@Result[0],Length(Result));
if s<0 then raise Exception.Create('LZ4 Decompress Error!');
SetLength(Result,S);
end;
{ TLZ4Stream }
constructor TLZ4CompressStream.Create(dest: TStream; compressionLevel: Integer=2);
begin
inherited Create(dest);
pref := LZ4F_INIT_PREFERENCES;
pref.compressionLevel :=compressionLevel;
CCTX := Context.GetCCTX;
FStream.Write(_buf^,LZ4F_compressBegin(CCTX,_buf,256*1024,@pref));
end;
destructor TLZ4CompressStream.Destroy;
begin
if _BufPos>0 then begin
var b := GetBuffer512;
try
var s := LZ4F_compressUpdate(CCTX,b,512*1024,_buf,_bufPos,nil);
if LZ4F_isError(s)<>0 then raise Exception.Create(LZ4F_getErrorName(s));
FStream.Write(b^,s);
finally
FreeBuffer512(b);
end;
end;
FStream.Write(_buf^,LZ4F_compressEnd(CCTX,_buf,256*1024,nil));
Context.FreeCCTX(CCTX);
inherited;
end;
procedure TLZ4CompressStream.DoCompress(buf: Pointer);
begin
var b := GetBuffer512;
try
var s := LZ4F_compressUpdate(CCTX,b,512*1024,buf,256*1024,nil);
if LZ4F_isError(s)<>0 then raise Exception.Create(LZ4F_getErrorName(s));
inc(total_out,s);
FStream.Write(b^,s);
finally
FreeBuffer512(b);
end;
end;
function TLZ4CompressStream.GetCompressionRate: Single;
begin
if total_in = 0 then result := 0
else result := (1.0 - (total_out / total_in)) * 100.0;
end;
function TLZ4CompressStream.Read(var buffer; count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is WriteOnly');
end;
function TLZ4CompressStream.Read(Buffer: TBytes; Offset, Count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is WriteOnly');
end;
function TLZ4CompressStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
if (offset = 0) and (origin = soCurrent) then
begin
result := total_in;
end
else Result := -1;
end;
function TLZ4CompressStream.Write(const Buffer: TBytes; Offset: Longint=0; Count:Longint =-1): Longint;
begin
if Count=-1 then Count := Length(Buffer)-Offset;
Result := Write(Buffer[Offset],Count);
end;
function TLZ4CompressStream.Write(const buffer; count: Longint): Longint;
var s : Cardinal;
source : PByte;
begin
Result := Count;
inc(total_in,Count);
source := @buffer;
while count>0 do begin
if (_bufpos>0)or(count<256*1024) then begin
s := count; if s>256*1024-_bufpos then s:= 256*1024-_bufpos;
{$IFDEF POSIX}
move(source^,(PByte(_buf)+_bufPos)^,s);
{$ELSE}
memmove(PByte(_buf)+_bufPos,source,s);
{$ENDIF}
inc(_bufPos,s);
dec(count,s);
inc(source,s);
if _bufPos=256*1024 then begin
DoCompress(_buf);
_bufPos := 0;
end
end else begin
DoCompress(source);
dec(count,256*1024);
inc(source,256*1024);
end;
end;
end;
{ TCustomLZ4Stream }
constructor TCustomLZ4Stream.Create(stream: TStream);
begin
inherited Create;
FStream := stream;
FStreamStartPos := Stream.Position;
FStreamPos := FStreamStartPos;
_buf := GetBuffer;
end;
{ TZDecompressionStream }
constructor TLZ4DecompressStream.Create(source: TStream; OwnsStream: Boolean=false);
begin
inherited Create(source);
FOwnsStream := OwnsStream;
DCTX := Context.GetDCTX;
_eof := false;
end;
destructor TLZ4DecompressStream.Destroy;
begin
if FOwnsStream then
FStream.Free;
Context.FreeDCTX(DCTX);
inherited;
end;
function TLZ4DecompressStream.Read(Buffer: TBytes; Offset:LongInt=0;Count: Longint=-1): Longint;
begin
if Count=-1 then Count := Length(Buffer)-Offset;
if Offset+Count>Length(Buffer) then SetLength(Buffer,Offset+Count);
Result := Read(Buffer[Offset],Count);
end;
function TLZ4DecompressStream.Read(var buffer; count: Longint): Longint;
var dst : PByte;
t,r,w : NativeInt;
begin
Dst := @buffer;
Result := 0;
while (count>0) do
if _bufPos<_bufSize then begin
w := count; r := _bufSize-_bufPos;
t := LZ4F_decompress(DCTX,Dst,@w,PByte(_buf)+_bufPos,@r,nil);
if LZ4F_isError(t)<>0 then raise Exception.Create(LZ4F_getErrorName(t));
inc(total_in,w);
dec(count,w);
inc(Dst,w);
inc(Result,w);
inc(_bufPos,r);
inc(total_out,r);
end else if _eof then break
else begin
_BufSize := FStream.Read(_Buf^,256*1024);
_bufPos := 0;
_eof := _BufSize<256*1024;
end;
end;
function TLZ4DecompressStream.Seek(const Offset: Int64;
Origin: TSeekOrigin): Int64;
begin
Result := -1;
end;
function TLZ4DecompressStream.Write(const Buffer: TBytes; Offset,
Count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is ReadOnly');
end;
function TLZ4DecompressStream.Write(const buffer; count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is ReadOnly');
end;
destructor TCustomLZ4Stream.Destroy;
begin
FreeBuffer(_buf);
inherited;
end;
{ Context }
class constructor Context.Create;
begin
_DCTX := nil;
_CCTX := nil;
end;
class destructor Context.Destroy;
begin
if _DCTX<>nil then LZ4F_freeDecompressionContext(_DCTX);
if _CCTX<>nil then LZ4F_freeCompressionContext(_CCTX);
end;
class procedure Context.FreeCCTX(C: PLZ4F_cctx);
begin
C := atomicexchange(_CCTX,C);
if C<>nil then LZ4F_freeCompressionContext(C);
end;
class procedure Context.FreeDCTX(C: PLZ4F_dctx);
begin
LZ4F_resetDecompressionContext(C);
C := atomicexchange(_DCTX,C);
if C<>nil then LZ4F_freeDecompressionContext(C);
end;
class function Context.GetCCTX: PLZ4F_cctx;
begin
Result := nil;
Result := atomicexchange(_CCTX,Result);
if Result = nil then LZ4F_createCompressionContext(@Result,LZ4F_VERSION);
end;
class function Context.GetDCTX: PLZ4F_dctx;
begin
Result := nil;
Result := atomicexchange(_DCTX,Result);
if Result = nil then LZ4F_createDecompressionContext(@Result,LZ4F_VERSION);
end;
end.

View File

@ -0,0 +1,37 @@
package PKGLZ4;
{$R *.res}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DEFINE RELEASE}
{$ENDIF IMPLICITBUILDING}
{$IMPLICITBUILD ON}
requires
rtl;
contains
lz4lib in 'lz4lib.pas',
LZ4 in 'LZ4.pas';
end.

View File

@ -0,0 +1,928 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{4E7B2FC9-A63E-48D8-9E21-89F56754E11A}</ProjectGuid>
<MainSource>PKGLZ4.dpk</MainSource>
<ProjectVersion>19.4</ProjectVersion>
<FrameworkType>None</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Package</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android' and '$(Base)'=='true') or '$(Base_Android)'!=''">
<Base_Android>true</Base_Android>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Base)'=='true') or '$(Base_Android64)'!=''">
<Base_Android64>true</Base_Android64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
<Base_iOSDevice64>true</Base_iOSDevice64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Base)'=='true') or '$(Base_OSX64)'!=''">
<Base_OSX64>true</Base_OSX64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSXARM64' and '$(Base)'=='true') or '$(Base_OSXARM64)'!=''">
<Base_OSXARM64>true</Base_OSXARM64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<GenDll>true</GenDll>
<GenPackage>true</GenPackage>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
<SanitizedProjectName>PKGLZ4</SanitizedProjectName>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<EnabledSysJars>annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar</EnabledSysJars>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android64)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<EnabledSysJars>annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar</EnabledSysJars>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSX64)'!=''">
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSXARM64)'!=''">
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
<DCC_IntegerOverflowCheck>true</DCC_IntegerOverflowCheck>
<DCC_RangeChecking>true</DCC_RangeChecking>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="lz4lib.pas"/>
<DCCReference Include="LZ4.pas"/>
<None Include="lz4delphi.c"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">PKGLZ4.dpk</Source>
</Source>
</Delphi.Personality>
<Deployment Version="3">
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\PKGLZ4.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>PKGLZ4.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\PKGLZ4.bpl" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>PKGLZ4.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\Win64\PKGLZ4.bpl" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>PKGLZ4.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClasses">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon192">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>0</Operation>
</Platform>
<Platform Name="OSXARM64">
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iOS_AppStore1024">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon152">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon167">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_SpotLight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon180">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification60">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting87">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSEntitlements"/>
<DeployClass Name="ProjectiOSInfoPList"/>
<DeployClass Name="ProjectiOSLaunchScreen"/>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug"/>
<DeployClass Name="ProjectOSXEntitlements"/>
<DeployClass Name="ProjectOSXInfoPList"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
</Deployment>
<Platforms>
<Platform value="Android">False</Platform>
<Platform value="Android64">False</Platform>
<Platform value="iOSDevice64">False</Platform>
<Platform value="Linux64">False</Platform>
<Platform value="OSX64">False</Platform>
<Platform value="OSXARM64">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>

Binary file not shown.

View File

@ -0,0 +1,7 @@
# LZ4Delphi
LZ4 Static Link Library for Delphi
For Demos Check [YW_DEMOS](https://github.com/YWtheGod/YW_DEMOS)
LZ4压缩静态链接库
LZ4算法速度很快但是压缩率不高但一个很大的优点是即使设置到最高压缩率其解压速度依然是极端的快所以适合单次压缩频繁高速解压的应用场景。
示范程序,参看 [YW_DEMOS](https://gitee.com/YWtheGod/YW_DEMOS)

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
#include "..\..\..\lib\lz4.c"
#include "..\..\..\lib\lz4hc.c"
#include "..\..\..\lib\lz4frame.c"

Binary file not shown.

Binary file not shown.

1295
contrib/LZ4Delphi/lz4lib.pas Normal file

File diff suppressed because it is too large Load Diff

View File

@ -338,6 +338,7 @@ function XXH64_update;begin exit(_XXH64_update(state,input,length))end;
function XXH64_digest;begin exit(_XXH64_digest(state))end;
procedure XXH64_canonicalFromHash;begin _XXH64_canonicalFromHash(dst,hash)end;
function XXH64_hashFromCanonical;begin exit(_XXH64_hashFromCanonical(src))end;
function XXH3_64bits;begin exit(_XXH3_64bits(data,len))end;
function XXH3_128bits;begin exit(_XXH3_128bits(data,len))end;
function XXH3_128bits_withSeed;begin exit(_XXH3_128bits_withSeed(data,len,seed))end;
function XXH3_128bits_withSecret;begin exit(_XXH3_128bits_withSecret(data,len,secret,secretSize))end;

1
contrib/ZSTD4Delphi/.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.tar filter=lfs diff=lfs merge=lfs -text

2
contrib/ZSTD4Delphi/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.~*

View File

@ -0,0 +1,39 @@
# ZSTD static link library for DELPHI
I got a lot problem try linking zstd with delphi since 1.5.1, everything is smooth when it was 1.5.0
I got AV error when using mingw GCC 11.2, and failed to compile when using mingw clang 13.0.1
And finally I got it success compiled with VS 17.1.1, but delphi raise a internal AV error when linking with 32bit object files.
So, I compiled 32bit object file with VS Clang 13.0 tool set, seems it work, but it won't work on 64bit mode(AV in run time).
So, VC tool set only works on 64bit mode, and Clang only works on 32bit mode, I just combined two together...
Some thing you should know:
This library depends on other two librarys:
- [libc](https://github.com/YWtheGod/LIBC)
- [XXHASH4DELPHI](https://github.com/YWtheGod/XXHASH4Delphi)
- ZSTD on Github: [ZSTD](https://github.com/facebook/zstd)
- For Demos: [YW_DEMOS](https://github.com/YWtheGod/YW_DEMOS)
ZSTD comes with a xxhash source code with its own, but I thought sharing a library would be better.
And I didn't compiled legecy supporting code into the object files, so it can't decompress data that was compressed by very old zstd library(before 1.0 I thought), if it will be a problem, let me known.
Now I compiled both AVX2 and SSE2 version of the codes, but if to run it on CPU that don't have AVX2 support, you also need to compile my XXHASH4Delphi library in SSE2 mode too.
It didn't use ASM codes for huffman decompressing on Windows platform, I don't think decompressing is really a matter, so I just let it be.
And finally, the 1.5.2 version of zstd runs about same speeds with 1.5.0, slighly slower in high compressing rate setting. but it also got slighly better compression rates on all compression levels.
我在编译1.5.1以上版本时遇到很多问题, gcc编译出来的代码总是AV错, mingw上的Clang编译不过
最终用的是VC 17.1.1编译过了64位初步测试正常, 32位下Delphi链接时报内部AV错了!
用VC切换到Clang工具集, 32位下初步测试过了64位竟然继续报AV错!
没办法最终提供的目标文件64位是VC++工具集编译的, 32位是VS Clang 13.0工具集编译的。
这个库依赖另外两个库,需要另外下载安装:
- [libc](https://github.com/YWtheGod/LIBC)
- [XXHASH4DELPHI](https://github.com/YWtheGod/XXHASH4Delphi)
- ZSTD官方Github: [ZSTD](https://github.com/facebook/zstd)
- 使用范例: [YW_DEMOS](https://gitee.com/YWtheGod/YW_DEMOS)
ZSTD自带一个xxhash源码并且它修改了xxhash源码的命名前缀以独占这些代码我取消了独占前缀让它与其他模块共享独立安装的XXHASH库。
我并没有将ZSTD老算法兼容代码编译进去所以它不能解压一些很老版本的ZSTD压缩数据(我估计起码老于1.0版本).
这次我附带了AVX2和SSE2版本的目标文件通过编译开关可以切换但是单独切换ZSTD还不够你还得在编译XXHASH4DELPHI时也选择同样的SSE2版本才能在没有AVX2的CPU上运行。
ZSTD在Windows平台下没有采用汇编代码的哈夫曼解压我觉得解压也不需要极限速度所以我就由得它没动它的汇编代码。
最后1.5.2速度基本和1.5.0版本差不多,高压缩设定下轻微慢一点点,但是在所有压缩率设定下,压缩体积都要更小一点点

View File

@ -0,0 +1,356 @@
unit ZSTD;
interface
uses classes, sysutils, ZSTDLib
{$IFDEF YWRTL},YWTypes{$ENDIF}
;
const
ZSTD_VERSION_MAJOR = ZSTDLib.ZSTD_VERSION_MAJOR;
ZSTD_VERSION_MINOR = ZSTDLib.ZSTD_VERSION_MINOR;
ZSTD_VERSION_RELEASE = ZSTDLib.ZSTD_VERSION_RELEASE;
ZSTD_VERSION_NUMBER = ZSTD_VERSION_MAJOR*100*100+ZSTD_VERSION_MINOR*100+
ZSTD_VERSION_RELEASE;
ZSTD_VERSION_STRING = ZSTDLib.ZSTD_VERSION_STRING;
ZSTD_CLEVEL_DEFAULT = ZSTDLib.ZSTD_CLEVEL_DEFAULT;
type
TCustomZSTDStream = class(TStream)
private
FStream: TStream;
FStreamStartPos: Int64;
FStreamPos: Int64;
FInBuffer :ZSTD_inBuffer;
FOutBuffer : ZSTD_outBuffer;
total_in, total_out : NativeInt;
protected
constructor Create(stream: TStream);
end;
TZSTDCompressStream=class(TCustomZSTDStream)
private
FCStream : ZSTD_CStream;
flevel : integer;
function GetCompressionRate: Single;
public
constructor Create(dest: TStream; compressionLevel: Integer=3);
destructor Destroy; override;
function Read(var buffer; count: Longint): Longint; override;
function Write(const buffer; count: Longint): Longint; override;
function Read(Buffer: TBytes; Offset, Count: Longint): Longint; override;
function Write(const Buffer: TBytes; Offset: Longint=0;Count:LongInt=-1): Longint; override;
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
property CompressionRate: Single read GetCompressionRate;
end;
TZSTDDecompressStream = class(TCustomZSTDStream)
private
FOwnsStream: Boolean;
FDStream : ZSTD_DStream;
_eof : boolean;
public
constructor Create(source: TStream; OwnsStream: Boolean=false);
destructor Destroy; override;
function Read(var buffer; count: Longint): Longint; override;
function Write(const buffer; count: Longint): Longint; override;
function Read(Buffer: TBytes; Offset, Count: Longint): Longint; override;
function Write(const Buffer: TBytes; Offset, Count: Longint): Longint; override;
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
end;
function CompressData(source : Pointer;srcSize:NativeInt; dst:Pointer;
dstCapacity:NativeInt; compressionLevel:integer=3):NativeInt; overload;
function DecompressData(Source:Pointer;srcSize:NativeInt;dst:Pointer;
dstCapacity:NativeInt):NativeInt; overload;
function CompressData(source :TBytes;index:NativeInt=0;size:NativeInt=-1;
compressionLevel:integer=3):TBytes; overload;
function DecompressData(Source:TBytes;Size:NativeInt=-1):TBytes; overload;
implementation
type
Context = record
class var [volatile]_CCTX : ZSTD_CCtx;
class var [volatile]_DCTX : ZSTD_DCtx;
class var [volatile]_CStream : ZSTD_CStream;
class var [volatile]_DStream : ZSTD_DStream;
class function GetCCTX:ZSTD_CCTX; inline; static;
class function GetDCTX:ZSTD_DCTX; inline; static;
class procedure FreeCCTX(C : ZSTD_CCTX); inline; static;
class procedure FreeDCTX(C : ZSTD_DCTX); inline; static;
class function GetCStream(cl:integer):ZSTD_CStream; inline; static;
class function GetDStream:ZSTD_DStream; inline; static;
class procedure FreeCStream(C : ZSTD_CStream); inline; static;
class procedure FreeDStream(C : ZSTD_DStream); inline; static;
class constructor Create;
class destructor Destroy;
end;
function GetBuffer : Pointer; inline;
begin
{$IFDEF YWRTL}Result:=BufferPool256K.GetBuffer{$ELSE}GetMem(Result,256*1024){$ENDIF}
end;
procedure FreeBuffer(var b : Pointer); inline;
begin
{$IFDEF YWRTL}BufferPool256K.FreeBuffer(b){$ELSE}FreeMem(b){$ENDIF}
end;
function CompressData(source : Pointer;srcSize:NativeInt; dst:Pointer;
dstCapacity:NativeInt; compressionLevel:integer=3):NativeInt; overload;
var TX : ZSTD_CCTX;
begin
TX := Context.GetCCTX;
try
Result:= ZSTD_CompressCCTX(TX,dst,dstCapacity,source,srcSize,compressionLevel);
finally
Context.FreeCCTX(TX);
end;
end;
function CompressData(source :TBytes;index:NativeInt=0;size:NativeInt=-1;compressionLevel:integer=3):TBytes;
overload;
begin
if size=-1 then size := Length(source);
if size=0 then exit(nil);
setlength(Result,ZSTD_COMPRESSBOUND(size));
setLength(Result,CompressData(@Source[0],size,@Result[0],Length(Result),
compressionLevel));
end;
function DecompressData(Source:Pointer;srcSize:NativeInt;dst:Pointer;
dstCapacity:NativeInt):NativeInt; overload;
var TX : ZSTD_DCTX;
begin
TX := Context.GetDCTX;
try
Result := ZSTD_decompressDCTX(TX,dst,dstCapacity,source,srcSize);
finally
Context.FreeDCTX(TX);
end;
end;
function DecompressData(Source:TBytes;Size:NativeInt=-1):TBytes; overload;
begin
if Size=-1 then Size := Length(Source);
SetLength(Result,Size*32);
SetLength(Result,DecompressData(@Source[0],Size,@Result[0],Length(Result)));
end;
{ TZSTDStream }
constructor TZSTDCompressStream.Create(dest: TStream; compressionLevel: Integer=3);
begin
inherited Create(dest);
flevel :=compressionLevel;
FCStream := Context.GetCStream(flevel);
FoutBuffer.size := 256*1024;
FoutBuffer.dst := GetBuffer;
FoutBuffer.pos := 0;
end;
destructor TZSTDCompressStream.Destroy;
begin
ZSTD_flushStream(FCStream,FoutBuffer);
FStream.Write(FoutBuffer.dst^,FoutBuffer.pos);
FreeBuffer(FoutBuffer.dst);
Context.FreeCStream(FCStream);
inherited;
end;
function TZSTDCompressStream.GetCompressionRate: Single;
begin
if total_in = 0 then result := 0
else result := (1.0 - (total_out / total_in)) * 100.0;
end;
function TZSTDCompressStream.Read(var buffer; count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is WriteOnly');
end;
function TZSTDCompressStream.Read(Buffer: TBytes; Offset, Count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is WriteOnly');
end;
function TZSTDCompressStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
begin
if (offset = 0) and (origin = soCurrent) then
begin
result := total_in;
end
else Result := -1;
end;
function TZSTDCompressStream.Write(const Buffer: TBytes; Offset: Longint=0;Count:LongInt=-1): Longint;
begin
if Count=-1 then Count := Length(Buffer)-Offset;
Result := Write(Buffer[Offset],Count);
end;
function TZSTDCompressStream.Write(const buffer; count: Longint): Longint;
begin
Finbuffer.src := @buffer;
Finbuffer.size := count;
Finbuffer.pos := 0;
while Finbuffer.pos<Finbuffer.size do begin
ZSTD_compressStream2(FCStream,Foutbuffer,FinBuffer,ZSTD_e_continue);
if FoutBuffer.pos>0 then begin
FStream.Write(FoutBuffer.dst^,FoutBuffer.pos);
total_out := total_out+FoutBuffer.pos;
FoutBuffer.pos := 0;
end;
end;
total_in := total_in+count;
Result := Count;
end;
{ TCustomZSTDStream }
constructor TCustomZSTDStream.Create(stream: TStream);
begin
inherited Create;
FStream := stream;
FStreamStartPos := Stream.Position;
FStreamPos := FStreamStartPos;
end;
{ TZDecompressionStream }
constructor TZSTDDecompressStream.Create(source: TStream; OwnsStream: Boolean=false);
begin
inherited Create(source);
FOwnsStream := OwnsStream;
FDStream := Context.GetDStream;
FinBuffer.size := 256*1024; //128K
FinBuffer.src := GetBuffer;
total_in := FStream.Read(FinBuffer.src^,FinBuffer.size);
_eof := total_in<FinBuffer.size;
FinBuffer.size := total_in;
end;
destructor TZSTDDecompressStream.Destroy;
begin
FreeBuffer(FinBuffer.src);
Context.FreeDStream(FDStream);
if FOwnsStream then
FStream.Free;
inherited;
end;
function TZSTDDecompressStream.Read(Buffer: TBytes; Offset,
Count: Longint): Longint;
begin
Result := Read(Buffer[Offset],Count);
end;
function TZSTDDecompressStream.Read(var buffer; count: Longint): Longint;
var a,b : NativeInt;
begin
FoutBuffer.dst := @Buffer;
FoutBuffer.size := Count;
FoutBuffer.pos := 0;
repeat
b := ZSTD_decompressStream(FDStream,FoutBuffer,FinBuffer);
if ZSTD_iserror(b)<>0 then raise Exception.Create('ZSTD Error '+b.toString);
if (FInBuffer.pos=FInBuffer.size) then begin
if _eof then break;
a := FStream.Read(FInBuffer.src^,FInBuffer.size);
total_in := total_in+a;
_eof := a<FInBuffer.size;
FInBuffer.size:= a;
FInBuffer.pos := 0;
end;
until FoutBuffer.pos=FoutBuffer.size;
total_out:=total_out+FoutBuffer.pos;
Result := FOutBuffer.pos;
end;
function TZSTDDecompressStream.Seek(const Offset: Int64;
Origin: TSeekOrigin): Int64;
begin
Result := -1;
end;
function TZSTDDecompressStream.Write(const Buffer: TBytes; Offset,
Count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is ReadOnly');
end;
function TZSTDDecompressStream.Write(const buffer; count: Longint): Longint;
begin
raise Exception.Create('Compress Stream is ReadOnly');
end;
{ Contex }
class constructor Context.Create;
begin
_CCtx := nil;
_DCTX := nil;
_CStream := nil;
_DStream := nil;
end;
class destructor Context.Destroy;
begin
if _CCTX<>nil then ZSTD_FreeCCTX(_CCtx);
if _DCTX<>nil then ZSTD_FreeDCTX(_DCTX);
if _CStream<>nil then ZSTD_FreeCStream(_CStream);
if _DStream<>nil then ZSTD_FreeDStream(_DStream);
end;
class procedure Context.FreeCCTX(C: ZSTD_CCTX);
begin
ZSTD_CCTX_reset(C,ZSTD_reset_session_only);
C := atomicExchange(_CCTX,C);
if C<>nil then ZSTD_FreeCCTX(c);
end;
class procedure Context.FreeCStream(C: ZSTD_CStream);
begin
C := atomicExchange(_CStream,C);
if C<>nil then ZSTD_FreeCStream(c);
end;
class procedure Context.FreeDCTX(C: ZSTD_DCTX);
begin
ZSTD_CCTX_reset(C,ZSTD_reset_session_only);
C := atomicExchange(_DCTX,C);
if C<>nil then ZSTD_FreeDCTX(c);
end;
class procedure Context.FreeDStream(C: ZSTD_DStream);
begin
ZSTD_initDStream(C);
C := atomicExchange(_DStream,C);
if C<>nil then ZSTD_FreeDStream(c);
end;
class function Context.GetCCTX: ZSTD_CCTX;
begin
Result := nil;
Result := atomicExchange(_CCTX,Result);
if Result=nil then Result := ZSTD_CreateCCTX;
end;
class function Context.GetCStream(cl: integer): ZSTD_CStream;
begin
Result := nil;
Result := atomicExchange(_CStream,Result);
if Result = nil then Result := ZSTD_createCStream;
ZSTD_initCStream(Result,cl);
end;
class function Context.GetDCTX: ZSTD_DCTX;
begin
Result := nil;
Result := atomicExchange(_DCTX,Result);
if Result=nil then Result := ZSTD_CreateDCTX;
end;
class function Context.GetDStream: ZSTD_DStream;
begin
Result := nil;
Result := atomicExchange(_DStream,Result);
if Result=nil then Result := ZSTD_CreateDStream;
end;
end.

View File

@ -0,0 +1,38 @@
package ZSTD4Delphi;
{$R *.res}
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DEFINE RELEASE}
{$ENDIF IMPLICITBUILDING}
{$IMPLICITBUILD ON}
requires
rtl,
pkglibc;
contains
ZSTDLib in 'ZSTDLib.pas',
ZSTD in 'ZSTD.pas';
end.

View File

@ -0,0 +1,975 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{AFFD1778-C01B-4A4A-9F25-E26FCD58EC71}</ProjectGuid>
<MainSource>ZSTD4Delphi.dpk</MainSource>
<ProjectVersion>19.4</ProjectVersion>
<FrameworkType>None</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Package</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android' and '$(Base)'=='true') or '$(Base_Android)'!=''">
<Base_Android>true</Base_Android>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Android64' and '$(Base)'=='true') or '$(Base_Android64)'!=''">
<Base_Android64>true</Base_Android64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
<Base_iOSDevice64>true</Base_iOSDevice64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSX64' and '$(Base)'=='true') or '$(Base_OSX64)'!=''">
<Base_OSX64>true</Base_OSX64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='OSXARM64' and '$(Base)'=='true') or '$(Base_OSXARM64)'!=''">
<Base_OSXARM64>true</Base_OSXARM64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
<Cfg_2_Win32>true</Cfg_2_Win32>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
<Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>..\$(ProductVersion)\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<GenDll>true</GenDll>
<GenPackage>true</GenPackage>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
<SanitizedProjectName>ZSTD4Delphi</SanitizedProjectName>
<VerInfo_Locale>2052</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar</EnabledSysJars>
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Android64)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar</EnabledSysJars>
<Android_LauncherIcon192>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png</Android_LauncherIcon192>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<iOS_AppStore1024>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png</iOS_AppStore1024>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSX64)'!=''">
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_OSXARM64)'!=''">
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple&apos;s speech recognition servers</VerInfo_Keys>
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
<DCC_Inlining>off</DCC_Inlining>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
<DCC_Inlining>auto</DCC_Inlining>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<DCC_DcuOutput>..\$(ProductVersion)\$(Platform)\$(Config)</DCC_DcuOutput>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="pkglibc.dcp"/>
<DCCReference Include="ZSTDLib.pas"/>
<DCCReference Include="ZSTD.pas"/>
<None Include="zstd4delphi.c"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType>Package</Borland.ProjectType>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">ZSTD4Delphi.dpk</Source>
</Source>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k280.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp280.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Platforms>
<Platform value="Android">False</Platform>
<Platform value="Android64">False</Platform>
<Platform value="iOSDevice64">False</Platform>
<Platform value="Linux64">False</Platform>
<Platform value="OSX64">False</Platform>
<Platform value="OSXARM64">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
<Platform Name="iOSSimulator">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
<Platform Name="OSX32">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\Win64\ZSTD4Delphi.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>ZSTD4Delphi.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\ZSTD4Delphi.bpl" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>ZSTD4Delphi.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\ZSTD4Delphi.bpl" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>ZSTD4Delphi.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\Win64\ZSTD4Delphi.bpl" Configuration="Release" Class="ProjectOutput">
<Platform Name="Win64">
<RemoteName>ZSTD4Delphi.bpl</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClasses">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>64</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidClassesDexFile">
<Platform Name="Android">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>classes</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidFileProvider">
<Platform Name="Android">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\xml</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidGDBServer">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiFile">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeArmeabiv7aFile">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidLibnativeMipsFile">
<Platform Name="Android">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\mips</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidServiceOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashImageDef">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStyles">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="AndroidSplashStylesV21">
<Platform Name="Android">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values-v21</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Colors">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_DefaultAppIcon">
<Platform Name="Android">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon144">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon192">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-ldpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_LauncherIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon24">
<Platform Name="Android">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-mdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon36">
<Platform Name="Android">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-hdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon48">
<Platform Name="Android">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon72">
<Platform Name="Android">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_NotificationIcon96">
<Platform Name="Android">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage426">
<Platform Name="Android">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-small</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage470">
<Platform Name="Android">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-normal</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage640">
<Platform Name="Android">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-large</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_SplashImage960">
<Platform Name="Android">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\drawable-xlarge</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="Android_Strings">
<Platform Name="Android">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>res\values</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyFramework">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.framework</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="DependencyPackage">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.bpl</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="File">
<Platform Name="Android">
<Operation>0</Operation>
</Platform>
<Platform Name="Android64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>0</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>0</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>0</Operation>
</Platform>
<Platform Name="OSXARM64">
<Operation>0</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iOS_AppStore1024">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon152">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_AppIcon167">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPad_SpotLight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_AppIcon180">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Launch3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark2x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_LaunchDark3x">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification40">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Notification60">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting58">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Setting87">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight120">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="iPhone_Spotlight80">
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectAndroidManifest">
<Platform Name="Android">
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceDebug">
<Platform Name="iOSDevice32">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectiOSEntitlements"/>
<DeployClass Name="ProjectiOSInfoPList"/>
<DeployClass Name="ProjectiOSLaunchScreen"/>
<DeployClass Name="ProjectiOSResource">
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXDebug"/>
<DeployClass Name="ProjectOSXEntitlements"/>
<DeployClass Name="ProjectOSXInfoPList"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<RemoteDir>Contents\Resources</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Required="true" Name="ProjectOutput">
<Platform Name="Android">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Android64">
<RemoteDir>library\lib\arm64-v8a</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
</Platform>
<Platform Name="Linux64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
</Platform>
<Platform Name="OSX64">
<Operation>1</Operation>
</Platform>
<Platform Name="OSXARM64">
<Operation>1</Operation>
</Platform>
<Platform Name="Win32">
<Operation>0</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOutput_Android32">
<Platform Name="Android64">
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectUWPManifest">
<Platform Name="Win32">
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo150">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="UWP_DelphiLogo44">
<Platform Name="Win32">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
<Platform Name="Win64">
<RemoteDir>Assets</RemoteDir>
<Operation>1</Operation>
</Platform>
</DeployClass>
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
</Deployment>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>2020/06/16 01:28:10.000.042,=rtl.dcp</Transaction>
<Transaction>2020/06/16 01:28:41.000.583,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\ZSTD.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\Package1.dproj</Transaction>
<Transaction>2020/06/16 01:28:54.000.792,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\Unit1.pas</Transaction>
<Transaction>2020/06/16 01:29:04.000.967,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\ZSTDLib.pas=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\Unit1.pas</Transaction>
<Transaction>2020/06/16 08:05:04.000.477,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\Unit1.pas</Transaction>
<Transaction>2020/06/16 08:05:13.000.496,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\libc.pas=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\Unit1.pas</Transaction>
<Transaction>2020/06/16 13:10:08.000.869,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\libc.pas=</Transaction>
<Transaction>2020/06/16 14:00:05.000.919,=pkglibc.dcp</Transaction>
<Transaction>2020/06/18 14:33:14.000.515,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\Unit1.pas</Transaction>
<Transaction>2020/06/18 14:33:33.000.922,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\Unit1.pas=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\ZSTDStream.pas</Transaction>
<Transaction>2020/12/24 22:59:00.000.255,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd148\ZSTD.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd148\ZSTD148.dproj</Transaction>
<Transaction>2021/01/25 20:51:35.000.742,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd148\ZSTDStream.pas=</Transaction>
<Transaction>2021/01/25 20:51:44.000.149,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd148\ZSTD.pas</Transaction>
<Transaction>2021/04/19 22:24:34.000.284,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd149\ZSTD148.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd149\ZSTD149.dproj</Transaction>
<Transaction>2021/05/20 22:52:35.000.767,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd150\ZSTD150.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd150\ZSTD149.dproj</Transaction>
<Transaction>2022/03/08 17:01:53.000.619,D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\ZSTD4Delphi.dproj=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\ZSTD150.dproj</Transaction>
<Transaction>2022/03/09 19:37:43.000.296,=D:\Users\YW\Documents\Embarcadero\Studio\Projects\YWLIB\zstd\zstd4delphi.c</Transaction>
</Transactions>
<ProjectSortOrder AutoSort="0" SortType="0">
<File Path="ZSTD.pas"/>
<File Path="zstd4delphi.c"/>
<File Path="ZSTDLib.pas"/>
<File Path="pkglibc.dcp"/>
<File Path="rtl.dcp"/>
</ProjectSortOrder>
</BorlandProject>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,24 @@
#define ZSTD_NO_TRACE
#define XXH_NAMESPACE
#include"common/error_private.c"
#include"common/zstd_common.c"
#include"compress/zstd_compress.c"
#include"compress/zstd_ldm.c"
#include"compress/zstd_double_fast.c"
#include"compress/zstd_fast.c"
#include"compress/zstd_opt.c"
#include"compress/zstd_lazy.c"
#include"compress/zstd_compress_literals.c"
#include"compress/hist.c"
#include"compress/zstd_compress_sequences.c"
#include"compress/zstd_compress_superblock.c"
#include"compress/huf_compress.c"
#define FSE_isError entropy_FSE_isErr
#define HUF_isError entropy_HUF_isErr
#include"common/entropy_common.c"
#include"compress/fse_compress.c"
#include"common/fse_decompress.c"
#include"decompress/zstd_decompress.c"
#include"decompress/zstd_ddict.c"
#include"decompress/zstd_decompress_block.c"
#include"decompress/huf_decompress.c"

Binary file not shown.

Binary file not shown.

View File

@ -1,176 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View File

@ -1,192 +0,0 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = xdelta3
noinst_PROGRAMS = xdelta3regtest xdelta3decode xdelta3checksum
export AFL_HARDEN
common_SOURCES = \
xdelta3-blkcache.h \
xdelta3-decode.h \
xdelta3-djw.h \
xdelta3-fgk.h \
xdelta3-hash.h \
xdelta3-internal.h \
xdelta3-list.h \
xdelta3-lzma.h \
xdelta3-main.h \
xdelta3-merge.h \
xdelta3-second.h \
xdelta3-test.h \
xdelta3-cfgs.h \
xdelta3.h
xdelta3_SOURCES = $(common_SOURCES) xdelta3.c
xdelta3decode_SOURCES = $(common_SOURCES) xdelta3.c
xdelta3regtest_SOURCES = $(common_SOURCES) \
testing/cmp.h \
testing/delta.h \
testing/file.h \
testing/modify.h \
testing/random.h \
testing/regtest.cc \
testing/regtest_c.c \
testing/segment.h \
testing/sizes.h \
testing/test.h
xdelta3checksum_SOURCES = $(common_SOURCES) \
testing/checksum_test.cc \
testing/checksum_test_c.c
# These sources constitute a regression test written in Go, that is
# not automatically built or run. Install Go-1.5.x or later, add
# `pwd`/go in $GOPATH, and (cd go/src && go run regtest.go).
# TODO(jmacd): replace hard-coded path names in regtest.go w/ flags.
GOLANG_SRCS = \
go/src/xdelta/test.go \
go/src/xdelta/rstream.go \
go/src/xdelta/tgroup.go \
go/src/xdelta/run.go \
go/src/regtest.go
# Note: for extra sanity checks, enable -Wconversion. Note there
# are a lot of false positives.
WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \
-Wformat=2 -Wno-format-nonliteral \
-Wno-unused-parameter -Wno-unused-function
# -Weverything \
# -Wc++11-compat-reserved-user-defined-literal \
# -Wno-padded \
# -Wno-format-nonliteral \
# -Wno-cast-align \
# -Wno-unused-parameter \
# -Wno-sign-conversion \
# -Wno-conversion \
# -Wno-switch-enum \
# -Wno-covered-switch-default \
# -Wno-disabled-macro-expansion \
# -Wno-variadic-macros \
# -Wno-c++98-compat-pedantic
C_WFLAGS = $(WFLAGS) -std=c99
CXX_WFLAGS = $(WFLAGS) -std=c++11
common_CFLAGS = \
-DREGRESSION_TEST=1 \
-DSECONDARY_DJW=1 \
-DSECONDARY_FGK=1 \
-DXD3_MAIN=1
if DEBUG_SYMBOLS
common_CFLAGS += -g
endif
#common_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
#common_CFLAGS += -O2
# For additional debugging, add -DXD3_DEBUG=1, 2, 3, ...
xdelta3_CFLAGS = $(C_WFLAGS) $(common_CFLAGS) -DXD3_DEBUG=0
xdelta3_LDADD = -lm
xdelta3decode_CFLAGS = \
$(C_WFLAGS) \
-DREGRESSION_TEST=0 \
-DSECONDARY_DJW=0 \
-DSECONDARY_FGK=0 \
-DSECONDARY_LZMA=0 \
-DXD3_MAIN=1 \
-DXD3_ENCODER=0 \
-DXD3_STDIO=1 \
-DEXTERNAL_COMPRESSION=0 \
-DVCDIFF_TOOLS=0
xdelta3regtest_CXXFLAGS = \
$(CXX_WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1
xdelta3regtest_CFLAGS = \
$(C_WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1
xdelta3regtest_LDADD = -lm
xdelta3checksum_CXXFLAGS = \
$(CXX_WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_MAIN=1 -std=c++11
xdelta3checksum_CFLAGS = \
$(C_WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_MAIN=1
man1_MANS = xdelta3.1
EXTRA_DIST = \
README.md \
run_release.sh \
draft-korn-vcdiff.txt \
$(GOLANG_SRCS) \
examples/Makefile \
examples/README.md \
examples/compare_test.c \
examples/encode_decode_test.c \
examples/small_page_test.c \
examples/speed_test.c \
examples/test.h \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test.xcodeproj/project.pbxproj \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSAppDelegate.h \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSAppDelegate.m \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSViewController.h \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/Xd3iOSViewController.m \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/en.lproj/InfoPlist.strings \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/en.lproj/MainStoryboard_iPad.storyboard \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/en.lproj/MainStoryboard_iPhone.storyboard \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/file_v1.bin \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/file_v1_to_v2.bin \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/file_v2.bin \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/main.m \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/xdelta3-ios-test-Info.plist \
examples/iOS/xdelta3-ios-test/xdelta3-ios-test/xdelta3-ios-test-Prefix.pch \
cpp-btree/CMakeLists.txt \
cpp-btree/COPYING \
cpp-btree/README \
cpp-btree/btree.h \
cpp-btree/btree_bench.cc \
cpp-btree/btree_container.h \
cpp-btree/btree_map.h \
cpp-btree/btree_set.h \
cpp-btree/btree_test.cc \
cpp-btree/btree_test.h \
cpp-btree/btree_test_flags.cc \
cpp-btree/safe_btree.h \
cpp-btree/safe_btree_map.h \
cpp-btree/safe_btree_set.h \
cpp-btree/safe_btree_test.cc \
testing/xdelta3-regtest.py \
testing/xdelta3-test.py \
xdelta3.1 \
xdelta3.i \
xdelta3.vcxproj \
xdelta3.wxi \
xdelta3.wxs
# Broken, removed from distribution:
# xdelta3_pywrap.c
# xdelta3.py
#PYFILES = xdelta3_pywrap.c xdelta3.py
#XDELTA3PY = xdelta3.py
#XDELTA3PYLIB = xdelta3.la
#BUILT_SOURCES = $(PYFILES)
#xdelta3_pywrap.c xdelta3.py : xdelta3.i
# $(SWIG) -python -o xdelta3_pywrap.c xdelta3.i
# OS X for some reason requires:
# pythondir = $(PYTHON_SITE_PKG)
# pyexecdir = $(PYTHON_SITE_PKG)
#python_PYTHON = $(XDELTA3PY)
#pyexec_LTLIBRARIES = $(XDELTA3PYLIB)
#_xdelta3_la_SOURCES = $(srcdir)/xdelta3_pywrap.c $(xdelta3_SOURCES)
#_xdelta3_la_CFLAGS = $(common_CFLAGS) -DNOT_MAIN=1 $(PYTHON_CPPFLAGS)
#_xdelta3_la_LDFLAGS = -module

View File

@ -1,37 +0,0 @@
Xdelta 3.x readme.txt
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010, 2011, 2012, 2013, 2014, 2015
<josh.macdonald@gmail.com>
Thanks for downloading Xdelta!
This directory contains the Xdelta3 command-line interface (CLI) and source
distribution for VCDIFF differential compression, a.k.a. delta
compression. The latest information and downloads are available here:
http://xdelta.org/
http://github.com/jmacd/xdelta/
Xdelta can be configured to use XZ Utils for secondary compression:
http://tukaani.org/xz/
The command-line syntax is detailed here:
https://github.com/jmacd/xdelta/blob/wiki/CommandLineSyntax.md
Run 'xdelta3 -h' for brief help. Run 'xdelta3 test' for built-in tests.
Sample commands (like gzip, -e means encode, -d means decode)
xdelta3 -9 -S lzma -e -f -s OLD_FILE NEW_FILE DELTA_FILE
xdelta3 -d -s OLD_FILE DELTA_FILE DECODED_FILE
File bug reports and browse open support issues here:
https://github.com/jmacd/xdelta/issues
The source distribution contains the C/C++/Python APIs, Unix, Microsoft VC++
and Cygwin builds. Xdelta3 is covered under the terms of the APL, see
LICENSE.

View File

@ -1,158 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define BUFSZ (1 << 22)
#ifdef WIN32
// whatever
static
double drand48() {
double r = rand() / (double)RAND_MAX;
return r;
}
long lrand48() {
long l = 0;
int i;
for (i = 0; i < 32; i++) {
l = l ^ (l << 2) ^ (l << 1) ^ rand();
}
return l;
}
#endif
#ifdef _WIN32
#define XD3_WIN32 1
#else
#define XD3_POSIX 1
#endif
#define XD3_MAIN 1
#define main notmain
#define EXTERNAL_COMPRESSION 0
#define XD3_USE_LARGEFILE64 1
#include "xdelta3.c"
#undef main
double error_prob = 0.0001;
usize_t mean_change = 100;
xoff_t total_change = 0;
xoff_t total_size = 0;
usize_t max_change = 0;
usize_t num_change = 0;
static usize_t
edist (usize_t mean, usize_t max)
{
double mean_d = mean;
double erand = log (1.0 / drand48 ());
usize_t x = (usize_t) (mean_d * erand + 0.5);
return (x < max) ? (x > 0 ? x : 1) : max;
}
void modify (char *buf, usize_t size)
{
usize_t bufpos = 0, j;
usize_t last_end = 0;
for (;; /* bufpos and j are incremented in the inner loop */)
{
/* The size of the next modification. */
usize_t next_size = edist (mean_change, 1 << 31);
/* The expected interval of such a change. */
double expect_interval = ((double) next_size * (1.0 - error_prob)) / error_prob;
/* The number of bytes until the next modification. */
usize_t next_mod = edist ((usize_t)expect_interval, 1 << 31);
if (next_size + next_mod + bufpos > size) { break; }
if (max_change < next_size) { max_change = next_size; }
bufpos += next_mod;
fprintf (stderr, "COPY: %I64u-%I64u (%u)\n",
total_size + (xoff_t)last_end,
total_size + (xoff_t)bufpos,
bufpos - last_end);
fprintf (stderr, "ADD: %I64u-%I64u (%u) is change %u\n",
total_size + (xoff_t)bufpos,
total_size + (xoff_t)(bufpos + next_size),
next_size, num_change);
total_change += next_size;
num_change += 1;
for (j = 0; j < next_size; j += 1, bufpos += 1)
{
buf[bufpos] = (char)(lrand48 () >> 3);
}
last_end = bufpos;
}
fprintf (stderr, "COPY: %I64u-%I64u (%u)\n",
total_size + last_end,
total_size + size, size - last_end);
total_size += size;
}
int main(int argc, char **argv)
{
main_file inp, out;
char *buf = malloc(BUFSZ);
int c, ret;
main_file_init(&inp);
main_file_init(&out);
option_force = 1;
if (argc > 5)
{
fprintf (stderr, "usage: badcopy [byte_error_prob [mean_error_size]]\n");
return 1;
}
if (argc > 4) { mean_change = atoi (argv[4]); }
if (argc > 3) { error_prob = atof (argv[3]); }
fprintf (stderr, "mean change = %u; error_prob = %0.10f\n", mean_change, error_prob);
if ((ret = main_file_open (&inp, argv[1], XO_READ)) != 0) {
return 1;
}
if ((ret = main_file_open (&out, argv[2], XO_WRITE)) != 0) {
return 1;
}
if (error_prob < 0.0 || error_prob > 1.0)
{
fprintf (stderr, "warning: error probability out of range\n");
return 1;
}
do
{
if ((ret = main_file_read (&inp, buf, BUFSZ, &c, "read failed")) != 0) {
return 1;
}
if (c == 0) { break; }
modify (buf, c);
if ((ret = main_file_write (&out, buf, c, "write failed")) != 0) {
return 1;
}
}
while (c == BUFSZ);
if ((ret = main_file_close (&out)))
{
return 1;
}
fprintf (stderr, "add_prob %f; %u adds; total_change %u of %u bytes; add percentage %f; max add size %u\n",
error_prob, num_change, total_change, total_size, (double) total_change / (double) total_size, max_change);
return 0;
}

View File

@ -1,51 +0,0 @@
AC_INIT([Xdelta3], [3.1.1], [josh.macdonald@gmail.com],
[xdelta3], [http://xdelta.org/])
AC_PREREQ([2.68])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
AM_INIT_AUTOMAKE([1.15 no-define foreign tar-ustar subdir-objects])
AC_CONFIG_MACRO_DIRS([m4])
AX_CHECK_ALIGNED_ACCESS_REQUIRED
AC_PROG_CC
AC_PROG_CXX
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned long long)
AC_ARG_WITH(
[liblzma],
[AC_HELP_STRING(
[--with-liblzma],
[build with liblzma support @<:@default=autodetect@:>@])],
[USE_LIBLZMA=$withval],
[USE_LIBLZMA=auto])
if test "x$USE_LIBLZMA" != xno ; then
AC_CHECK_HEADERS([lzma.h],,[
if test "x$with_liblzma" = xyes ; then
AC_MSG_FAILURE([liblzma includes were not found])
fi])
AC_CHECK_LIB([lzma], [lzma_easy_buffer_encode],,[
if test "x$with_liblzma" = xyes ; then
AC_MSG_FAILURE([liblzma library were not found])
fi])
fi
#AM_PATH_PYTHON(,, [:])
#AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
#AX_PYTHON_DEVEL()
#AX_PKG_SWIG(2.0.0,,)
#AX_SWIG_PYTHON
dnl --enable-debug-symbols : build with debug symbols?
AC_ARG_ENABLE(debug-symbols,
AS_HELP_STRING(--enable-debug-symbols,[Build with debug symbols (default is NO)]),,enableval=no)
AM_CONDITIONAL([DEBUG_SYMBOLS], [test ${enableval} = "yes"])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -1,40 +0,0 @@
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 2.6)
project(cppbtree CXX)
option(build_tests "Build B-tree tests" OFF)
add_definitions(-std=c++11)
set(CMAKE_CXX_FLAGS "-g -O2")
# CMake doesn't have a way to pure template library,
# add_library(cppbtree btree.h btree_map.h btree_set.h
# safe_btree.h safe_btree_map.h safe_btree_set.h)
# set_target_properties(cppbtree PROPERTIES LINKER_LANGUAGE CXX)
if(build_tests)
enable_testing()
include_directories($ENV{GTEST_ROOT}/include)
link_directories($ENV{GTEST_ROOT})
include_directories($ENV{GFLAGS_ROOT}/include)
link_directories($ENV{GFLAGS_ROOT}/lib)
add_executable(btree_test btree_test.cc btree_test_flags.cc)
add_executable(safe_btree_test safe_btree_test.cc btree_test_flags.cc)
add_executable(btree_bench btree_bench.cc btree_test_flags.cc)
target_link_libraries(btree_test gtest_main gtest gflags)
target_link_libraries(safe_btree_test gtest_main gtest gflags)
target_link_libraries(btree_bench gflags gtest)
endif()

View File

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,31 +0,0 @@
This library is a C++ template library and, as such, there is no
library to build and install. Copy the .h files and use them!
See http://code.google.com/p/cpp-btree/wiki/UsageInstructions for
details.
----
To build and run the provided tests, however, you will need to install
CMake, the Google C++ Test framework, and the Google flags package.
Download and install CMake from http://www.cmake.org
Download and build the GoogleTest framework from
http://code.google.com/p/googletest
Download and install gflags from https://code.google.com/p/gflags
Set GTEST_ROOT to the directory where GTEST was built.
Set GFLAGS_ROOT to the directory prefix where GFLAGS is installed.
export GTEST_ROOT=/path/for/gtest-x.y
export GFLAGS_ROOT=/opt
cmake . -Dbuild_tests=ON
For example, to build on a Unix system with the clang++ compiler,
export GTEST_ROOT=$(HOME)/src/googletest
export GFLAGS_ROOT=/opt
cmake . -G "Unix Makefiles" -Dbuild_tests=ON -DCMAKE_CXX_COMPILER=clang++

File diff suppressed because it is too large Load Diff

View File

@ -1,593 +0,0 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdint.h>
#include <stdlib.h>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
#include <string>
#include <sys/time.h>
#include <type_traits>
#include <vector>
#include "gflags/gflags.h"
#include "btree_map.h"
#include "btree_set.h"
#include "btree_test.h"
DEFINE_int32(test_random_seed, 123456789, "Seed for srand()");
DEFINE_int32(benchmark_max_iters, 10000000, "Maximum test iterations");
DEFINE_int32(benchmark_min_iters, 100, "Minimum test iterations");
DEFINE_int32(benchmark_target_seconds, 1,
"Attempt to benchmark for this many seconds");
using std::allocator;
using std::less;
using std::map;
using std::max;
using std::min;
using std::multimap;
using std::multiset;
using std::set;
using std::string;
using std::vector;
namespace btree {
namespace {
struct RandGen {
typedef ptrdiff_t result_type;
RandGen(result_type seed) {
srand(seed);
}
result_type operator()(result_type l) {
return rand() % l;
}
};
struct BenchmarkRun {
BenchmarkRun(const char *name, void (*func)(int));
void Run();
void Stop();
void Start();
void Reset();
BenchmarkRun *next_benchmark;
const char *benchmark_name;
void (*benchmark_func)(int);
int64_t accum_micros;
int64_t last_started;
};
BenchmarkRun *first_benchmark;
BenchmarkRun *current_benchmark;
int64_t get_micros () {
timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec * 1000000 + tv.tv_usec;
}
BenchmarkRun::BenchmarkRun(const char *name, void (*func)(int))
: next_benchmark(first_benchmark),
benchmark_name(name),
benchmark_func(func),
accum_micros(0),
last_started(0) {
first_benchmark = this;
}
#define BTREE_BENCHMARK(name) \
BTREE_BENCHMARK2(#name, name, __COUNTER__)
#define BTREE_BENCHMARK2(name, func, counter) \
BTREE_BENCHMARK3(name, func, counter)
#define BTREE_BENCHMARK3(name, func, counter) \
BenchmarkRun bench ## counter (name, func)
void StopBenchmarkTiming() {
current_benchmark->Stop();
}
void StartBenchmarkTiming() {
current_benchmark->Start();
}
void RunBenchmarks() {
for (BenchmarkRun *bench = first_benchmark; bench;
bench = bench->next_benchmark) {
bench->Run();
}
}
void BenchmarkRun::Start() {
assert(!last_started);
last_started = get_micros();
}
void BenchmarkRun::Stop() {
if (last_started == 0) {
return;
}
accum_micros += get_micros() - last_started;
last_started = 0;
}
void BenchmarkRun::Reset() {
last_started = 0;
accum_micros = 0;
}
void BenchmarkRun::Run() {
assert(current_benchmark == NULL);
current_benchmark = this;
int iters = FLAGS_benchmark_min_iters;
for (;;) {
Reset();
Start();
benchmark_func(iters);
Stop();
if (accum_micros > FLAGS_benchmark_target_seconds * 1000000 ||
iters >= FLAGS_benchmark_max_iters) {
break;
} else if (accum_micros == 0) {
iters *= 100;
} else {
int64_t target_micros = FLAGS_benchmark_target_seconds * 1000000;
iters = target_micros * iters / accum_micros;
}
iters = min(iters, FLAGS_benchmark_max_iters);
}
std::cout << benchmark_name << "\t"
<< accum_micros * 1000 / iters << "\t"
<< iters;
current_benchmark = NULL;
}
// Used to avoid compiler optimizations for these benchmarks.
template <typename T>
void sink(const T& t0) {
volatile T t = t0;
}
// Benchmark insertion of values into a container.
template <typename T>
void BM_Insert(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
typename KeyOfValue<typename T::key_type, V>::type key_of_value;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
T container;
vector<V> values = GenerateValues<V>(FLAGS_benchmark_values);
for (int i = 0; i < values.size(); i++) {
container.insert(values[i]);
}
for (int i = 0; i < n; ) {
// Remove and re-insert 10% of the keys
int m = min(n - i, FLAGS_benchmark_values / 10);
for (int j = i; j < i + m; j++) {
int x = j % FLAGS_benchmark_values;
container.erase(key_of_value(values[x]));
}
StartBenchmarkTiming();
for (int j = i; j < i + m; j++) {
int x = j % FLAGS_benchmark_values;
container.insert(values[x]);
}
StopBenchmarkTiming();
i += m;
}
}
// Benchmark lookup of values in a container.
template <typename T>
void BM_Lookup(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
typename KeyOfValue<typename T::key_type, V>::type key_of_value;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
T container;
vector<V> values = GenerateValues<V>(FLAGS_benchmark_values);
for (int i = 0; i < values.size(); i++) {
container.insert(values[i]);
}
V r = V();
StartBenchmarkTiming();
for (int i = 0; i < n; i++) {
int m = i % values.size();
r = *container.find(key_of_value(values[m]));
}
StopBenchmarkTiming();
sink(r); // Keep compiler from optimizing away r.
}
// Benchmark lookup of values in a full container, meaning that values
// are inserted in-order to take advantage of biased insertion, which
// yields a full tree.
template <typename T>
void BM_FullLookup(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
typename KeyOfValue<typename T::key_type, V>::type key_of_value;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
T container;
vector<V> values = GenerateValues<V>(FLAGS_benchmark_values);
vector<V> sorted(values);
sort(sorted.begin(), sorted.end());
for (int i = 0; i < sorted.size(); i++) {
container.insert(sorted[i]);
}
V r = V();
StartBenchmarkTiming();
for (int i = 0; i < n; i++) {
int m = i % values.size();
r = *container.find(key_of_value(values[m]));
}
StopBenchmarkTiming();
sink(r); // Keep compiler from optimizing away r.
}
// Benchmark deletion of values from a container.
template <typename T>
void BM_Delete(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
typename KeyOfValue<typename T::key_type, V>::type key_of_value;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
T container;
vector<V> values = GenerateValues<V>(FLAGS_benchmark_values);
for (int i = 0; i < values.size(); i++) {
container.insert(values[i]);
}
for (int i = 0; i < n; ) {
// Remove and re-insert 10% of the keys
int m = min(n - i, FLAGS_benchmark_values / 10);
StartBenchmarkTiming();
for (int j = i; j < i + m; j++) {
int x = j % FLAGS_benchmark_values;
container.erase(key_of_value(values[x]));
}
StopBenchmarkTiming();
for (int j = i; j < i + m; j++) {
int x = j % FLAGS_benchmark_values;
container.insert(values[x]);
}
i += m;
}
}
// Benchmark steady-state insert (into first half of range) and remove
// (from second second half of range), treating the container
// approximately like a queue with log-time access for all elements.
// This benchmark does not test the case where insertion and removal
// happen in the same region of the tree. This benchmark counts two
// value constructors.
template <typename T>
void BM_QueueAddRem(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
typename KeyOfValue<typename T::key_type, V>::type key_of_value;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
assert(FLAGS_benchmark_values % 2 == 0);
T container;
const int half = FLAGS_benchmark_values / 2;
vector<int> remove_keys(half);
vector<int> add_keys(half);
for (int i = 0; i < half; i++) {
remove_keys[i] = i;
add_keys[i] = i;
}
RandGen rand(FLAGS_test_random_seed);
random_shuffle(remove_keys.begin(), remove_keys.end(), rand);
random_shuffle(add_keys.begin(), add_keys.end(), rand);
Generator<V> g(FLAGS_benchmark_values + FLAGS_benchmark_max_iters);
for (int i = 0; i < half; i++) {
container.insert(g(add_keys[i]));
container.insert(g(half + remove_keys[i]));
}
// There are three parts each of size "half":
// 1 is being deleted from [offset - half, offset)
// 2 is standing [offset, offset + half)
// 3 is being inserted into [offset + half, offset + 2 * half)
int offset = 0;
StartBenchmarkTiming();
for (int i = 0; i < n; i++) {
int idx = i % half;
if (idx == 0) {
StopBenchmarkTiming();
random_shuffle(remove_keys.begin(), remove_keys.end(), rand);
random_shuffle(add_keys.begin(), add_keys.end(), rand);
offset += half;
StartBenchmarkTiming();
}
int e = container.erase(key_of_value(g(offset - half + remove_keys[idx])));
assert(e == 1);
container.insert(g(offset + half + add_keys[idx]));
}
StopBenchmarkTiming();
}
// Mixed insertion and deletion in the same range using pre-constructed values.
template <typename T>
void BM_MixedAddRem(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
typename KeyOfValue<typename T::key_type, V>::type key_of_value;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
assert(FLAGS_benchmark_values % 2 == 0);
T container;
RandGen rand(FLAGS_test_random_seed);
vector<V> values = GenerateValues<V>(FLAGS_benchmark_values * 2);
// Create two random shuffles
vector<int> remove_keys(FLAGS_benchmark_values);
vector<int> add_keys(FLAGS_benchmark_values);
// Insert the first half of the values (already in random order)
for (int i = 0; i < FLAGS_benchmark_values; i++) {
container.insert(values[i]);
// remove_keys and add_keys will be swapped before each round,
// therefore fill add_keys here w/ the keys being inserted, so
// they'll be the first to be removed.
remove_keys[i] = i + FLAGS_benchmark_values;
add_keys[i] = i;
}
StartBenchmarkTiming();
for (int i = 0; i < n; i++) {
int idx = i % FLAGS_benchmark_values;
if (idx == 0) {
StopBenchmarkTiming();
remove_keys.swap(add_keys);
random_shuffle(remove_keys.begin(), remove_keys.end(), rand);
random_shuffle(add_keys.begin(), add_keys.end(), rand);
StartBenchmarkTiming();
}
int e = container.erase(key_of_value(values[remove_keys[idx]]));
assert(e == 1);
container.insert(values[add_keys[idx]]);
}
StopBenchmarkTiming();
}
// Insertion at end, removal from the beginning. This benchmark
// counts two value constructors.
template <typename T>
void BM_Fifo(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
T container;
Generator<V> g(FLAGS_benchmark_values + FLAGS_benchmark_max_iters);
for (int i = 0; i < FLAGS_benchmark_values; i++) {
container.insert(g(i));
}
StartBenchmarkTiming();
for (int i = 0; i < n; i++) {
container.erase(container.begin());
container.insert(container.end(), g(i + FLAGS_benchmark_values));
}
StopBenchmarkTiming();
}
// Iteration (forward) through the tree
template <typename T>
void BM_FwdIter(int n) {
typedef typename std::remove_const<typename T::value_type>::type V;
// Disable timing while we perform some initialization.
StopBenchmarkTiming();
T container;
vector<V> values = GenerateValues<V>(FLAGS_benchmark_values);
for (int i = 0; i < FLAGS_benchmark_values; i++) {
container.insert(values[i]);
}
typename T::iterator iter;
V r = V();
StartBenchmarkTiming();
for (int i = 0; i < n; i++) {
int idx = i % FLAGS_benchmark_values;
if (idx == 0) {
iter = container.begin();
}
r = *iter;
++iter;
}
StopBenchmarkTiming();
sink(r); // Keep compiler from optimizing away r.
}
typedef set<int32_t> stl_set_int32;
typedef set<int64_t> stl_set_int64;
typedef set<string> stl_set_string;
typedef map<int32_t, intptr_t> stl_map_int32;
typedef map<int64_t, intptr_t> stl_map_int64;
typedef map<string, intptr_t> stl_map_string;
typedef multiset<int32_t> stl_multiset_int32;
typedef multiset<int64_t> stl_multiset_int64;
typedef multiset<string> stl_multiset_string;
typedef multimap<int32_t, intptr_t> stl_multimap_int32;
typedef multimap<int64_t, intptr_t> stl_multimap_int64;
typedef multimap<string, intptr_t> stl_multimap_string;
#define MY_BENCHMARK_TYPES2(value, name, size) \
typedef btree ## _set<value, less<value>, allocator<value>, size> \
btree ## _ ## size ## _set_ ## name; \
typedef btree ## _map<value, int, less<value>, allocator<value>, size> \
btree ## _ ## size ## _map_ ## name; \
typedef btree ## _multiset<value, less<value>, allocator<value>, size> \
btree ## _ ## size ## _multiset_ ## name; \
typedef btree ## _multimap<value, int, less<value>, allocator<value>, size> \
btree ## _ ## size ## _multimap_ ## name
#define MY_BENCHMARK_TYPES(value, name) \
MY_BENCHMARK_TYPES2(value, name, 128); \
MY_BENCHMARK_TYPES2(value, name, 160); \
MY_BENCHMARK_TYPES2(value, name, 192); \
MY_BENCHMARK_TYPES2(value, name, 224); \
MY_BENCHMARK_TYPES2(value, name, 256); \
MY_BENCHMARK_TYPES2(value, name, 288); \
MY_BENCHMARK_TYPES2(value, name, 320); \
MY_BENCHMARK_TYPES2(value, name, 352); \
MY_BENCHMARK_TYPES2(value, name, 384); \
MY_BENCHMARK_TYPES2(value, name, 416); \
MY_BENCHMARK_TYPES2(value, name, 448); \
MY_BENCHMARK_TYPES2(value, name, 480); \
MY_BENCHMARK_TYPES2(value, name, 512); \
MY_BENCHMARK_TYPES2(value, name, 1024); \
MY_BENCHMARK_TYPES2(value, name, 1536); \
MY_BENCHMARK_TYPES2(value, name, 2048)
MY_BENCHMARK_TYPES(int32_t, int32);
MY_BENCHMARK_TYPES(int64_t, int64);
MY_BENCHMARK_TYPES(string, string);
#define MY_BENCHMARK4(type, name, func) \
void BM_ ## type ## _ ## name(int n) { BM_ ## func <type>(n); } \
BTREE_BENCHMARK(BM_ ## type ## _ ## name)
// Define NODESIZE_TESTING when running btree_perf.py.
#ifdef NODESIZE_TESTING
#define MY_BENCHMARK3(tree, type, name, func) \
MY_BENCHMARK4(tree ## _128_ ## type, name, func); \
MY_BENCHMARK4(tree ## _160_ ## type, name, func); \
MY_BENCHMARK4(tree ## _192_ ## type, name, func); \
MY_BENCHMARK4(tree ## _224_ ## type, name, func); \
MY_BENCHMARK4(tree ## _256_ ## type, name, func); \
MY_BENCHMARK4(tree ## _288_ ## type, name, func); \
MY_BENCHMARK4(tree ## _320_ ## type, name, func); \
MY_BENCHMARK4(tree ## _352_ ## type, name, func); \
MY_BENCHMARK4(tree ## _384_ ## type, name, func); \
MY_BENCHMARK4(tree ## _416_ ## type, name, func); \
MY_BENCHMARK4(tree ## _448_ ## type, name, func); \
MY_BENCHMARK4(tree ## _480_ ## type, name, func); \
MY_BENCHMARK4(tree ## _512_ ## type, name, func); \
MY_BENCHMARK4(tree ## _1024_ ## type, name, func); \
MY_BENCHMARK4(tree ## _1536_ ## type, name, func); \
MY_BENCHMARK4(tree ## _2048_ ## type, name, func)
#else
#define MY_BENCHMARK3(tree, type, name, func) \
MY_BENCHMARK4(tree ## _256_ ## type, name, func); \
MY_BENCHMARK4(tree ## _2048_ ## type, name, func)
#endif
#define MY_BENCHMARK2(type, name, func) \
MY_BENCHMARK4(stl_ ## type, name, func); \
MY_BENCHMARK3(btree, type, name, func)
#define MY_BENCHMARK(type) \
MY_BENCHMARK2(type, insert, Insert); \
MY_BENCHMARK2(type, lookup, Lookup); \
MY_BENCHMARK2(type, fulllookup, FullLookup); \
MY_BENCHMARK2(type, delete, Delete); \
MY_BENCHMARK2(type, queueaddrem, QueueAddRem); \
MY_BENCHMARK2(type, mixedaddrem, MixedAddRem); \
MY_BENCHMARK2(type, fifo, Fifo); \
MY_BENCHMARK2(type, fwditer, FwdIter)
MY_BENCHMARK(set_int32);
MY_BENCHMARK(map_int32);
MY_BENCHMARK(set_int64);
MY_BENCHMARK(map_int64);
MY_BENCHMARK(set_string);
MY_BENCHMARK(map_string);
MY_BENCHMARK(multiset_int32);
MY_BENCHMARK(multimap_int32);
MY_BENCHMARK(multiset_int64);
MY_BENCHMARK(multimap_int64);
MY_BENCHMARK(multiset_string);
MY_BENCHMARK(multimap_string);
} // namespace
} // namespace btree
int main(int argc, char **argv) {
btree::RunBenchmarks();
return 0;
}

View File

@ -1,349 +0,0 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef UTIL_BTREE_BTREE_CONTAINER_H__
#define UTIL_BTREE_BTREE_CONTAINER_H__
#include <iosfwd>
#include <utility>
#include "btree.h"
namespace btree {
// A common base class for btree_set, btree_map, btree_multiset and
// btree_multimap.
template <typename Tree>
class btree_container {
typedef btree_container<Tree> self_type;
public:
typedef typename Tree::params_type params_type;
typedef typename Tree::key_type key_type;
typedef typename Tree::value_type value_type;
typedef typename Tree::key_compare key_compare;
typedef typename Tree::allocator_type allocator_type;
typedef typename Tree::pointer pointer;
typedef typename Tree::const_pointer const_pointer;
typedef typename Tree::reference reference;
typedef typename Tree::const_reference const_reference;
typedef typename Tree::size_type size_type;
typedef typename Tree::difference_type difference_type;
typedef typename Tree::iterator iterator;
typedef typename Tree::const_iterator const_iterator;
typedef typename Tree::reverse_iterator reverse_iterator;
typedef typename Tree::const_reverse_iterator const_reverse_iterator;
public:
// Default constructor.
btree_container(const key_compare &comp, const allocator_type &alloc)
: tree_(comp, alloc) {
}
// Copy constructor.
btree_container(const self_type &x)
: tree_(x.tree_) {
}
// Iterator routines.
iterator begin() { return tree_.begin(); }
const_iterator begin() const { return tree_.begin(); }
iterator end() { return tree_.end(); }
const_iterator end() const { return tree_.end(); }
reverse_iterator rbegin() { return tree_.rbegin(); }
const_reverse_iterator rbegin() const { return tree_.rbegin(); }
reverse_iterator rend() { return tree_.rend(); }
const_reverse_iterator rend() const { return tree_.rend(); }
// Lookup routines.
iterator lower_bound(const key_type &key) {
return tree_.lower_bound(key);
}
const_iterator lower_bound(const key_type &key) const {
return tree_.lower_bound(key);
}
iterator upper_bound(const key_type &key) {
return tree_.upper_bound(key);
}
const_iterator upper_bound(const key_type &key) const {
return tree_.upper_bound(key);
}
std::pair<iterator,iterator> equal_range(const key_type &key) {
return tree_.equal_range(key);
}
std::pair<const_iterator,const_iterator> equal_range(const key_type &key) const {
return tree_.equal_range(key);
}
// Utility routines.
void clear() {
tree_.clear();
}
void swap(self_type &x) {
tree_.swap(x.tree_);
}
void dump(std::ostream &os) const {
tree_.dump(os);
}
void verify() const {
tree_.verify();
}
// Size routines.
size_type size() const { return tree_.size(); }
size_type max_size() const { return tree_.max_size(); }
bool empty() const { return tree_.empty(); }
size_type height() const { return tree_.height(); }
size_type internal_nodes() const { return tree_.internal_nodes(); }
size_type leaf_nodes() const { return tree_.leaf_nodes(); }
size_type nodes() const { return tree_.nodes(); }
size_type bytes_used() const { return tree_.bytes_used(); }
static double average_bytes_per_value() {
return Tree::average_bytes_per_value();
}
double fullness() const { return tree_.fullness(); }
double overhead() const { return tree_.overhead(); }
bool operator==(const self_type& x) const {
if (size() != x.size()) {
return false;
}
for (const_iterator i = begin(), xi = x.begin(); i != end(); ++i, ++xi) {
if (*i != *xi) {
return false;
}
}
return true;
}
bool operator!=(const self_type& other) const {
return !operator==(other);
}
protected:
Tree tree_;
};
template <typename T>
inline std::ostream& operator<<(std::ostream &os, const btree_container<T> &b) {
b.dump(os);
return os;
}
// A common base class for btree_set and safe_btree_set.
template <typename Tree>
class btree_unique_container : public btree_container<Tree> {
typedef btree_unique_container<Tree> self_type;
typedef btree_container<Tree> super_type;
public:
typedef typename Tree::key_type key_type;
typedef typename Tree::value_type value_type;
typedef typename Tree::size_type size_type;
typedef typename Tree::key_compare key_compare;
typedef typename Tree::allocator_type allocator_type;
typedef typename Tree::iterator iterator;
typedef typename Tree::const_iterator const_iterator;
public:
// Default constructor.
btree_unique_container(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_unique_container(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_unique_container(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
insert(b, e);
}
// Lookup routines.
iterator find(const key_type &key) {
return this->tree_.find_unique(key);
}
const_iterator find(const key_type &key) const {
return this->tree_.find_unique(key);
}
size_type count(const key_type &key) const {
return this->tree_.count_unique(key);
}
// Insertion routines.
std::pair<iterator,bool> insert(const value_type &x) {
return this->tree_.insert_unique(x);
}
iterator insert(iterator position, const value_type &x) {
return this->tree_.insert_unique(position, x);
}
template <typename InputIterator>
void insert(InputIterator b, InputIterator e) {
this->tree_.insert_unique(b, e);
}
// Deletion routines.
int erase(const key_type &key) {
return this->tree_.erase_unique(key);
}
// Erase the specified iterator from the btree. The iterator must be valid
// (i.e. not equal to end()). Return an iterator pointing to the node after
// the one that was erased (or end() if none exists).
iterator erase(const iterator &iter) {
return this->tree_.erase(iter);
}
void erase(const iterator &first, const iterator &last) {
this->tree_.erase(first, last);
}
};
// A common base class for btree_map and safe_btree_map.
template <typename Tree>
class btree_map_container : public btree_unique_container<Tree> {
typedef btree_map_container<Tree> self_type;
typedef btree_unique_container<Tree> super_type;
public:
typedef typename Tree::key_type key_type;
typedef typename Tree::data_type data_type;
typedef typename Tree::value_type value_type;
typedef typename Tree::mapped_type mapped_type;
typedef typename Tree::key_compare key_compare;
typedef typename Tree::allocator_type allocator_type;
private:
// A pointer-like object which only generates its value when
// dereferenced. Used by operator[] to avoid constructing an empty data_type
// if the key already exists in the map.
struct generate_value {
generate_value(const key_type &k)
: key(k) {
}
value_type operator*() const {
return std::make_pair(key, data_type());
}
const key_type &key;
};
public:
// Default constructor.
btree_map_container(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_map_container(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_map_container(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(b, e, comp, alloc) {
}
// Insertion routines.
data_type& operator[](const key_type &key) {
return this->tree_.insert_unique(key, generate_value(key)).first->second;
}
};
// A common base class for btree_multiset and btree_multimap.
template <typename Tree>
class btree_multi_container : public btree_container<Tree> {
typedef btree_multi_container<Tree> self_type;
typedef btree_container<Tree> super_type;
public:
typedef typename Tree::key_type key_type;
typedef typename Tree::value_type value_type;
typedef typename Tree::size_type size_type;
typedef typename Tree::key_compare key_compare;
typedef typename Tree::allocator_type allocator_type;
typedef typename Tree::iterator iterator;
typedef typename Tree::const_iterator const_iterator;
public:
// Default constructor.
btree_multi_container(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_multi_container(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_multi_container(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
insert(b, e);
}
// Lookup routines.
iterator find(const key_type &key) {
return this->tree_.find_multi(key);
}
const_iterator find(const key_type &key) const {
return this->tree_.find_multi(key);
}
size_type count(const key_type &key) const {
return this->tree_.count_multi(key);
}
// Insertion routines.
iterator insert(const value_type &x) {
return this->tree_.insert_multi(x);
}
iterator insert(iterator position, const value_type &x) {
return this->tree_.insert_multi(position, x);
}
template <typename InputIterator>
void insert(InputIterator b, InputIterator e) {
this->tree_.insert_multi(b, e);
}
// Deletion routines.
int erase(const key_type &key) {
return this->tree_.erase_multi(key);
}
// Erase the specified iterator from the btree. The iterator must be valid
// (i.e. not equal to end()). Return an iterator pointing to the node after
// the one that was erased (or end() if none exists).
iterator erase(const iterator &iter) {
return this->tree_.erase(iter);
}
void erase(const iterator &first, const iterator &last) {
this->tree_.erase(first, last);
}
};
} // namespace btree
#endif // UTIL_BTREE_BTREE_CONTAINER_H__

View File

@ -1,130 +0,0 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// A btree_map<> implements the STL unique sorted associative container
// interface and the pair associative container interface (a.k.a map<>) using a
// btree. A btree_multimap<> implements the STL multiple sorted associative
// container interface and the pair associtive container interface (a.k.a
// multimap<>) using a btree. See btree.h for details of the btree
// implementation and caveats.
#ifndef UTIL_BTREE_BTREE_MAP_H__
#define UTIL_BTREE_BTREE_MAP_H__
#include <algorithm>
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include "btree.h"
#include "btree_container.h"
namespace btree {
// The btree_map class is needed mainly for its constructors.
template <typename Key, typename Value,
typename Compare = std::less<Key>,
typename Alloc = std::allocator<std::pair<const Key, Value> >,
int TargetNodeSize = 256>
class btree_map : public btree_map_container<
btree<btree_map_params<Key, Value, Compare, Alloc, TargetNodeSize> > > {
typedef btree_map<Key, Value, Compare, Alloc, TargetNodeSize> self_type;
typedef btree_map_params<
Key, Value, Compare, Alloc, TargetNodeSize> params_type;
typedef btree<params_type> btree_type;
typedef btree_map_container<btree_type> super_type;
public:
typedef typename btree_type::key_compare key_compare;
typedef typename btree_type::allocator_type allocator_type;
public:
// Default constructor.
btree_map(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_map(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_map(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(b, e, comp, alloc) {
}
};
template <typename K, typename V, typename C, typename A, int N>
inline void swap(btree_map<K, V, C, A, N> &x,
btree_map<K, V, C, A, N> &y) {
x.swap(y);
}
// The btree_multimap class is needed mainly for its constructors.
template <typename Key, typename Value,
typename Compare = std::less<Key>,
typename Alloc = std::allocator<std::pair<const Key, Value> >,
int TargetNodeSize = 256>
class btree_multimap : public btree_multi_container<
btree<btree_map_params<Key, Value, Compare, Alloc, TargetNodeSize> > > {
typedef btree_multimap<Key, Value, Compare, Alloc, TargetNodeSize> self_type;
typedef btree_map_params<
Key, Value, Compare, Alloc, TargetNodeSize> params_type;
typedef btree<params_type> btree_type;
typedef btree_multi_container<btree_type> super_type;
public:
typedef typename btree_type::key_compare key_compare;
typedef typename btree_type::allocator_type allocator_type;
typedef typename btree_type::data_type data_type;
typedef typename btree_type::mapped_type mapped_type;
public:
// Default constructor.
btree_multimap(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_multimap(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_multimap(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(b, e, comp, alloc) {
}
};
template <typename K, typename V, typename C, typename A, int N>
inline void swap(btree_multimap<K, V, C, A, N> &x,
btree_multimap<K, V, C, A, N> &y) {
x.swap(y);
}
} // namespace btree
#endif // UTIL_BTREE_BTREE_MAP_H__

View File

@ -1,121 +0,0 @@
// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// A btree_set<> implements the STL unique sorted associative container
// interface (a.k.a set<>) using a btree. A btree_multiset<> implements the STL
// multiple sorted associative container interface (a.k.a multiset<>) using a
// btree. See btree.h for details of the btree implementation and caveats.
#ifndef UTIL_BTREE_BTREE_SET_H__
#define UTIL_BTREE_BTREE_SET_H__
#include <functional>
#include <memory>
#include <string>
#include "btree.h"
#include "btree_container.h"
namespace btree {
// The btree_set class is needed mainly for its constructors.
template <typename Key,
typename Compare = std::less<Key>,
typename Alloc = std::allocator<Key>,
int TargetNodeSize = 256>
class btree_set : public btree_unique_container<
btree<btree_set_params<Key, Compare, Alloc, TargetNodeSize> > > {
typedef btree_set<Key, Compare, Alloc, TargetNodeSize> self_type;
typedef btree_set_params<Key, Compare, Alloc, TargetNodeSize> params_type;
typedef btree<params_type> btree_type;
typedef btree_unique_container<btree_type> super_type;
public:
typedef typename btree_type::key_compare key_compare;
typedef typename btree_type::allocator_type allocator_type;
public:
// Default constructor.
btree_set(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_set(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_set(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(b, e, comp, alloc) {
}
};
template <typename K, typename C, typename A, int N>
inline void swap(btree_set<K, C, A, N> &x, btree_set<K, C, A, N> &y) {
x.swap(y);
}
// The btree_multiset class is needed mainly for its constructors.
template <typename Key,
typename Compare = std::less<Key>,
typename Alloc = std::allocator<Key>,
int TargetNodeSize = 256>
class btree_multiset : public btree_multi_container<
btree<btree_set_params<Key, Compare, Alloc, TargetNodeSize> > > {
typedef btree_multiset<Key, Compare, Alloc, TargetNodeSize> self_type;
typedef btree_set_params<Key, Compare, Alloc, TargetNodeSize> params_type;
typedef btree<params_type> btree_type;
typedef btree_multi_container<btree_type> super_type;
public:
typedef typename btree_type::key_compare key_compare;
typedef typename btree_type::allocator_type allocator_type;
public:
// Default constructor.
btree_multiset(const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(comp, alloc) {
}
// Copy constructor.
btree_multiset(const self_type &x)
: super_type(x) {
}
// Range constructor.
template <class InputIterator>
btree_multiset(InputIterator b, InputIterator e,
const key_compare &comp = key_compare(),
const allocator_type &alloc = allocator_type())
: super_type(b, e, comp, alloc) {
}
};
template <typename K, typename C, typename A, int N>
inline void swap(btree_multiset<K, C, A, N> &x,
btree_multiset<K, C, A, N> &y) {
x.swap(y);
}
} // namespace btree
#endif // UTIL_BTREE_BTREE_SET_H__

Some files were not shown because too many files have changed in this diff Show More