This commit is contained in:
Alexander
2023-02-02 12:02:14 +03:00
parent 703d2d5a52
commit 8e2f0fdd9c
94 changed files with 25754 additions and 1 deletions

View File

@@ -0,0 +1,174 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{BEF6069D-A5FD-48FE-A930-0CE57B83DC93}</ProjectGuid>
<MainSource>FWZipPerfomance.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>14.6</ProjectVersion>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<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)'=='Release' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' 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="'$(Base)'!=''">
<DCC_N>false</DCC_N>
<DCC_ImageBase>00400000</DCC_ImageBase>
<DCC_E>false</DCC_E>
<VerInfo_Locale>1049</VerInfo_Locale>
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=;CFBundleDisplayName=;UIDeviceFamily=;CFBundleIdentifier=;CFBundleVersion=;CFBundlePackageType=;CFBundleSignature=;CFBundleAllowMixedLocalizations=;UISupportedInterfaceOrientations=;CFBundleExecutable=;CFBundleResourceSpecification=;LSRequiresIPhoneOS=;CFBundleInfoDictionaryVersion=;CFBundleDevelopmentRegion=</VerInfo_Keys>
<DCC_S>false</DCC_S>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<Icon_MainIcon>FWZipPerfomance_Icon.ico</Icon_MainIcon>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<Icon_MainIcon>FWZipPerfomance_Icon.ico</Icon_MainIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_DebugInformation>false</DCC_DebugInformation>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_Optimize>false</DCC_Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="Unit1.pas">
<Form>Form1</Form>
</DCCReference>
<DCCReference Include="..\..\FWZipConsts.pas"/>
<DCCReference Include="..\..\FWZipCrc32.pas"/>
<DCCReference Include="..\..\FWZipCrypt.pas"/>
<DCCReference Include="..\..\FWZipReader.pas"/>
<DCCReference Include="..\..\FWZipStream.pas"/>
<DCCReference Include="..\..\FWZipWriter.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Release">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">FWZipPerfomance.dpr</Source>
</Source>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1049</VersionInfo>
<VersionInfo Name="CodePage">1251</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename"/>
<VersionInfoKeys Name="ProductName"/>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
<VersionInfoKeys Name="CFBundleName"/>
<VersionInfoKeys Name="CFBundleDisplayName"/>
<VersionInfoKeys Name="UIDeviceFamily"/>
<VersionInfoKeys Name="CFBundleIdentifier"/>
<VersionInfoKeys Name="CFBundleVersion"/>
<VersionInfoKeys Name="CFBundlePackageType"/>
<VersionInfoKeys Name="CFBundleSignature"/>
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
<VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
<VersionInfoKeys Name="CFBundleExecutable"/>
<VersionInfoKeys Name="CFBundleResourceSpecification"/>
<VersionInfoKeys Name="LSRequiresIPhoneOS"/>
<VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
<VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k180.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp180.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Platforms>
<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')"/>
</Project>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="fwzip"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,13 @@
program FWZipPerfomance;
{$MODE Delphi}
uses
Forms, Interfaces,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,285 @@
object Form1: TForm1
Left = 381
Height = 654
Top = 183
Width = 578
Caption = 'Тест производительности FWZip'
ClientHeight = 654
ClientWidth = 578
Color = clBtnFace
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Position = poScreenCenter
LCLVersion = '1.2.4.0'
object GroupBox1: TGroupBox
Left = 8
Height = 105
Top = 8
Width = 527
Anchors = [akTop, akLeft, akRight]
Caption = 'Настройки сжатия'
ClientHeight = 87
ClientWidth = 523
TabOrder = 0
object LabeledEdit1: TLabeledEdit
Left = 14
Height = 21
Top = 26
Width = 465
Anchors = [akTop, akLeft, akRight]
EditLabel.AnchorSideLeft.Control = LabeledEdit1
EditLabel.AnchorSideRight.Control = LabeledEdit1
EditLabel.AnchorSideRight.Side = asrBottom
EditLabel.AnchorSideBottom.Control = LabeledEdit1
EditLabel.Left = 14
EditLabel.Height = 13
EditLabel.Top = 10
EditLabel.Width = 465
EditLabel.Caption = 'Выберите папку для сжатия:'
EditLabel.ParentColor = False
TabOrder = 0
Text = 'D:\StroyInfo 5'
OnChange = LabeledEdit1Change
end
object Button1: TButton
Left = 485
Height = 25
Hint = 'Обзор...'
Top = 24
Width = 26
Anchors = [akTop, akRight]
Caption = '...'
OnClick = Button1Click
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object CheckBox1: TCheckBox
Left = 14
Height = 19
Top = 58
Width = 141
Caption = 'Шифровать при сжатии'
OnClick = CheckBox1Click
TabOrder = 2
end
object LabeledEdit2: TLabeledEdit
Left = 262
Height = 21
Top = 56
Width = 168
Anchors = [akTop, akLeft, akRight]
EditLabel.AnchorSideTop.Control = LabeledEdit2
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = LabeledEdit2
EditLabel.AnchorSideBottom.Control = LabeledEdit2
EditLabel.AnchorSideBottom.Side = asrBottom
EditLabel.Left = 175
EditLabel.Height = 13
EditLabel.Top = 60
EditLabel.Width = 84
EditLabel.Caption = 'Укажите пароль'
EditLabel.ParentColor = False
Enabled = False
LabelPosition = lpLeft
TabOrder = 3
end
object Button2: TButton
Left = 436
Height = 25
Top = 55
Width = 75
Anchors = [akTop, akRight]
Caption = 'Сжать'
OnClick = Button2Click
TabOrder = 4
end
end
object GroupBox2: TGroupBox
Left = 8
Height = 137
Top = 128
Width = 527
Anchors = [akTop, akLeft, akRight]
Caption = 'Настройки распаковки'
ClientHeight = 119
ClientWidth = 523
TabOrder = 1
object LabeledEdit3: TLabeledEdit
Left = 14
Height = 21
Top = 26
Width = 465
Anchors = [akTop, akLeft, akRight]
EditLabel.AnchorSideLeft.Control = LabeledEdit3
EditLabel.AnchorSideRight.Control = LabeledEdit3
EditLabel.AnchorSideRight.Side = asrBottom
EditLabel.AnchorSideBottom.Control = LabeledEdit3
EditLabel.Left = 14
EditLabel.Height = 13
EditLabel.Top = 10
EditLabel.Width = 465
EditLabel.Caption = 'Выберите архив для распаковки:'
EditLabel.ParentColor = False
TabOrder = 0
OnChange = LabeledEdit3Change
end
object Button3: TButton
Left = 485
Height = 25
Hint = 'Обзор...'
Top = 24
Width = 26
Anchors = [akTop, akRight]
Caption = '...'
OnClick = Button3Click
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object CheckBox2: TCheckBox
Left = 14
Height = 19
Top = 58
Width = 117
Caption = 'Архив зашифрован'
OnClick = CheckBox2Click
TabOrder = 2
end
object LabeledEdit4: TLabeledEdit
Left = 262
Height = 21
Top = 56
Width = 163
Anchors = [akTop, akLeft, akRight]
EditLabel.AnchorSideTop.Control = LabeledEdit4
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = LabeledEdit4
EditLabel.AnchorSideBottom.Control = LabeledEdit4
EditLabel.AnchorSideBottom.Side = asrBottom
EditLabel.Left = 175
EditLabel.Height = 13
EditLabel.Top = 60
EditLabel.Width = 84
EditLabel.Caption = 'Укажите пароль'
EditLabel.ParentColor = False
Enabled = False
LabelPosition = lpLeft
TabOrder = 3
end
object Button4: TButton
Left = 436
Height = 25
Top = 54
Width = 75
Anchors = [akTop, akRight]
Caption = 'Распаковать'
OnClick = Button4Click
TabOrder = 4
end
object Button6: TButton
Tag = 1
Left = 436
Height = 25
Top = 85
Width = 75
Anchors = [akTop, akRight]
Caption = 'Проверить'
OnClick = Button4Click
TabOrder = 5
end
end
object GroupBox3: TGroupBox
Left = 8
Height = 178
Top = 271
Width = 527
Anchors = [akTop, akLeft, akRight]
Caption = 'Производительность:'
ClientHeight = 160
ClientWidth = 523
TabOrder = 2
object Label1: TLabel
Left = 14
Height = 13
Top = 10
Width = 163
Caption = 'Текущий расход памяти: 0 байт'
ParentColor = False
end
object Label2: TLabel
Left = 14
Height = 13
Top = 29
Width = 163
Caption = 'Пиковый расход памяти: 0 байт'
ParentColor = False
end
object Label3: TLabel
Left = 14
Height = 13
Top = 48
Width = 166
Caption = 'Общее количество элементов: 0'
ParentColor = False
end
object Label4: TLabel
Left = 14
Height = 13
Top = 67
Width = 142
Caption = 'Общее размер элементов: 0'
ParentColor = False
end
object Label5: TLabel
Left = 14
Height = 13
Top = 95
Width = 497
Anchors = [akTop, akLeft, akRight]
AutoSize = False
ParentColor = False
end
object ProgressBar1: TProgressBar
Left = 14
Height = 17
Top = 114
Width = 494
Anchors = [akTop, akLeft, akRight]
TabOrder = 0
end
object ProgressBar2: TProgressBar
Left = 14
Height = 17
Top = 137
Width = 494
Anchors = [akTop, akLeft, akRight]
TabOrder = 1
end
object Button5: TButton
Left = 433
Height = 25
Top = 83
Width = 75
Anchors = [akTop, akRight]
Caption = 'Остановить'
OnClick = Button5Click
TabOrder = 2
Visible = False
end
end
object Memo1: TMemo
Left = 8
Height = 146
Top = 456
Width = 527
Anchors = [akTop, akLeft, akRight, akBottom]
ScrollBars = ssVertical
TabOrder = 3
end
object OpenDialog1: TOpenDialog
left = 376
top = 224
end
end

View File

@@ -0,0 +1,300 @@
////////////////////////////////////////////////////////////////////////////////
//
// ****************************************************************************
// * Project : FWZip - FWZipPerfomance
// * Purpose : Тестирование производительности FWZip
// * Author : Александр (Rouse_) Багель
// * Copyright : © Fangorn Wizards Lab 1998 - 2013.
// * Version : 1.0.10
// * Home Page : http://rouse.drkb.ru
// * Home Blog : http://alexander-bagel.blogspot.ru
// ****************************************************************************
// * Stable Release : http://rouse.drkb.ru/components.php#fwzip
// * Latest Source : https://github.com/AlexanderBagel/FWZip
// ****************************************************************************
//
// Используемые источники:
// ftp://ftp.info-zip.org/pub/infozip/doc/appnote-iz-latest.zip
// http://zlib.net/zlib-1.2.5.tar.gz
// http://www.base2ti.com/
//
unit Unit1;
{$MODE Delphi}
interface
{$WARN SYMBOL_PLATFORM OFF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN UNIT_PLATFORM OFF}
uses
LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, FileCtrl, ComCtrls, FileUtil,
FWZipWriter, FWZipReader, FWZipConsts, Contnrs;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
LabeledEdit1: TLabeledEdit;
Button1: TButton;
CheckBox1: TCheckBox;
LabeledEdit2: TLabeledEdit;
Button2: TButton;
GroupBox2: TGroupBox;
LabeledEdit3: TLabeledEdit;
Button3: TButton;
CheckBox2: TCheckBox;
LabeledEdit4: TLabeledEdit;
Button4: TButton;
OpenDialog1: TOpenDialog;
GroupBox3: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ProgressBar1: TProgressBar;
ProgressBar2: TProgressBar;
Label5: TLabel;
Button5: TButton;
Button6: TButton;
Memo1: TMemo;
procedure CheckBox1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure LabeledEdit1Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure LabeledEdit3Change(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
InitialHeapSize, MaxHeapSize, AverageHeapSize: Int64;
TotalGetHeapStatusCount: Integer;
StopProcess: Boolean;
procedure OnProgress(Sender: TObject; const FileName: string;
Percent, TotalPercent: Byte; var Cancel: Boolean;
ProgressState: TProgressState);
procedure UpdateMemoryStatus;
procedure SetEnabledState(Value: Boolean);
procedure ClearZipData;
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Dir: string;
begin
if SelectDirectory('Укажите папку для сжатия', '', Dir) then
LabeledEdit1.Text := Dir;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
I: Integer;
TotalSize: Int64;
Heap: THeapStatus;
TicCount: DWORD;
Item: TFWZipWriterItem;
Writer: TFWZipWriter;
begin
Writer := TFWZipWriter.Create;
try
Writer.UseUTF8String:= true;
DeleteFileUTF8(IncludeTrailingPathDelimiter(LabeledEdit1.Text) + 'FWZipTest.zip'); { *Converted from DeleteFile* }
Writer.AddFolder('', LabeledEdit1.Text, '');
TotalSize := 0;
InitialHeapSize := 0;
for I := 0 to Writer.Count - 1 do
begin
Item := Writer[I];
Inc(TotalSize, Item.Size);
Inc(InitialHeapSize, SizeOf(TCentralDirectoryFileHeaderEx));
if LabeledEdit2.Text <> '' then
begin
Item.Password := LabeledEdit2.Text;
Item.NeedDescriptor := True;
end;
end;
Label3.Caption := 'Общее количество элементов: ' + IntToStr(Writer.Count);
Label4.Caption := 'Общий размер элементов: ' + IntToStr(TotalSize);
Writer.OnProgress := OnProgress;
SetEnabledState(False);
try
Heap := GetHeapStatus;
Inc(InitialHeapSize, Heap.Overhead + Heap.TotalAllocated);
MaxHeapSize := 0;
AverageHeapSize := 0;
TotalGetHeapStatusCount := 0;
StopProcess := False;
TicCount := GetTickCount;
Writer.BuildZip(
IncludeTrailingPathDelimiter(LabeledEdit1.Text) + 'FWZipTest.zip');
if TotalGetHeapStatusCount = 0 then
TotalGetHeapStatusCount := 1;
ShowMessage(Format(
'Пиковый расход памяти: %d байт' + sLineBreak +
'Средний расход памяти: %d байт' + sLineBreak +
'Общее время работы: %d секунд',
[MaxHeapSize, AverageHeapSize div TotalGetHeapStatusCount,
(GetTickCount - TicCount) div 1000]));
finally
SetEnabledState(True);
end;
finally
Writer.Free;
ClearZipData;
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
if OpenDialog1.Execute then
LabeledEdit3.Text := OpenDialog1.FileName;
end;
procedure TForm1.Button4Click(Sender: TObject);
var
I: Integer;
TotalSize: Int64;
Heap: THeapStatus;
TicCount: DWORD;
Path: string;
Reader: TFWZipReader;
begin
SetLength(Path, MAX_PATH);
Path := LabeledEdit3.Text;
Path := ChangeFileExt(Path, '');
Reader := TFWZipReader.Create;
try
Reader.LoadFromFile(LabeledEdit3.Text);
TotalSize := 0;
for I := 0 to Reader.Count - 1 do
Inc(TotalSize, Reader[I].UncompressedSize);
Label3.Caption := 'Общее количество элементов: ' + IntToStr(Reader.Count);
Label4.Caption := 'Общий размер элементов: ' + IntToStr(TotalSize);
Reader.OnProgress := OnProgress;
if LabeledEdit4.Text <> '' then
Reader.PasswordList.Add(LabeledEdit4.Text);
SetEnabledState(False);
try
Heap := GetHeapStatus;
InitialHeapSize := Heap.Overhead + Heap.TotalAllocated;
MaxHeapSize := 0;
AverageHeapSize := 0;
TotalGetHeapStatusCount := 0;
StopProcess := False;
Memo1.Lines.Clear;
TicCount := GetTickCount;
if TButton(Sender).Tag = 0 then
Reader.ExtractAll(Path)
else
Reader.Check;
if TotalGetHeapStatusCount = 0 then
TotalGetHeapStatusCount := 1;
ShowMessage(Format(
'Пиковый расход памяти: %d байт' + sLineBreak +
'Средний расход памяти: %d байт' + sLineBreak +
'Общее время работы: %d секунд',
[MaxHeapSize, AverageHeapSize div TotalGetHeapStatusCount,
(GetTickCount - TicCount) div 1000]));
finally
SetEnabledState(True);
end;
finally
Reader.Free;
ClearZipData;
end;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
StopProcess := True;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
LabeledEdit2.Enabled := CheckBox1.Checked;
end;
procedure TForm1.CheckBox2Click(Sender: TObject);
begin
LabeledEdit4.Enabled := CheckBox2.Checked;
end;
procedure TForm1.ClearZipData;
begin
Label1.Caption := 'Текущий расход памяти: 0 байт';
Label2.Caption := 'Пиковый расход памяти: 0 байт';
Label3.Caption := 'Общее количество элементов: 0';
Label4.Caption := 'Общий размер элементов: 0';
Label5.Caption := '';
end;
procedure TForm1.LabeledEdit1Change(Sender: TObject);
begin
Button2.Enabled := DirectoryExistsUTF8(LabeledEdit1.Text); { *Converted from DirectoryExists* }
end;
procedure TForm1.LabeledEdit3Change(Sender: TObject);
begin
Button4.Enabled := FileExistsUTF8(LabeledEdit3.Text); { *Converted from FileExists* }
end;
procedure TForm1.OnProgress(Sender: TObject; const FileName: string; Percent,
TotalPercent: Byte; var Cancel: Boolean; ProgressState: TProgressState);
const
p: array [TProgressState] of string = ('psStart', 'psInitialization',
'psInProgress', 'psFinalization', 'psEnd', 'psException');
begin
Cancel := StopProcess;
Label5.Caption := Format('(%d) %s', [Percent, FileName]);
ProgressBar1.Position := Percent;
ProgressBar2.Position := TotalPercent;
Memo1.Lines.Add(Format('%s - %s percent %d total %d',
[FileName, P[ProgressState], Percent, TotalPercent]));
UpdateMemoryStatus;
end;
procedure TForm1.SetEnabledState(Value: Boolean);
begin
Button1.Enabled := Value;
Button2.Enabled := Value;
Button3.Enabled := Value;
Button4.Enabled := Value;
Button5.Visible := not Value;
Button6.Enabled := Value;
LabeledEdit1.Enabled := Value;
LabeledEdit2.Enabled := Value;
LabeledEdit3.Enabled := Value;
LabeledEdit4.Enabled := Value;
CheckBox1.Enabled := Value;
CheckBox2.Enabled := Value;
end;
procedure TForm1.UpdateMemoryStatus;
var
HeapStatus: THeapStatus;
HeapSize: Int64;
begin
HeapStatus := GetHeapStatus;
HeapSize := HeapStatus.Overhead + HeapStatus.TotalAllocated;
Dec(HeapSize, InitialHeapSize);
if HeapSize > MaxHeapSize then
MaxHeapSize := HeapSize;
Inc(TotalGetHeapStatusCount);
Inc(AverageHeapSize, HeapSize);
Label1.Caption := 'Текущий расход памяти: ' + IntToStr(HeapSize) + ' байт';
Label2.Caption := 'Пиковый расход памяти: ' + IntToStr(MaxHeapSize) + ' байт';
Application.ProcessMessages;
Application.ProcessMessages;
end;
end.

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="-1"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<IsPartOfProject Value="True"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<IsPartOfProject Value="True"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<IsPartOfProject Value="True"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<IsPartOfProject Value="True"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<IsPartOfProject Value="True"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<IsPartOfProject Value="True"/>
</Unit7>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
<OtherUnitFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipConsts"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<IsPartOfProject Value="True"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipCrypt"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipReader"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<IsPartOfProject Value="True"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipWriter"/>
</Unit7>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
<OtherUnitFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="fwzip"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="FWZipPerfomance"/>
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="fwzip"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="..\.."/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<SyntaxMode Value="delphi"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,19 @@
program FWZipPerfomance;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
FWZipConsts in '..\..\FWZipConsts.pas',
FWZipCrc32 in '..\..\FWZipCrc32.pas',
FWZipCrypt in '..\..\FWZipCrypt.pas',
FWZipReader in '..\..\FWZipReader.pas',
FWZipStream in '..\..\FWZipStream.pas',
FWZipWriter in '..\..\FWZipWriter.pas';
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,21 @@
program FWZipPerfomance;
{$MODE Delphi}
uses
Forms, Interfaces,
Unit1 in 'Unit1.pas' {Form1},
FWZipConsts in '..\..\FWZipConsts.pas',
FWZipCrc32 in '..\..\FWZipCrc32.pas',
FWZipCrypt in '..\..\FWZipCrypt.pas',
FWZipReader in '..\..\FWZipReader.pas',
FWZipStream in '..\..\FWZipStream.pas',
FWZipWriter in '..\..\FWZipWriter.pas';
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,19 @@
program FWZipPerfomance;
{$MODE Delphi}
uses
Forms, Interfaces,
Unit1 in 'Unit1.pas' {Form1},
FWZipConsts in '..\..\FWZipConsts.pas',
FWZipCrc32 in '..\..\FWZipCrc32.pas',
FWZipCrypt in '..\..\FWZipCrypt.pas',
FWZipReader in '..\..\FWZipReader.pas',
FWZipStream in '..\..\FWZipStream.pas',
FWZipWriter in '..\..\FWZipWriter.pas';
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectSession>
<SkipCheckLCLInterfaces Value="True"/>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectSession>
<SkipCheckLCLInterfaces Value="True"/>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipConsts"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipCrypt"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipReader"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<IsPartOfProject Value="True"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FWZipWriter"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="4"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectSession>
<SkipCheckLCLInterfaces Value="True"/>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="10" Y="4"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="37"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<UnitName Value="FWZipConsts"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<UnitName Value="FWZipCrypt"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<UnitName Value="FWZipReader"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<UnitName Value="FWZipWriter"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="2"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectSession>
<SkipCheckLCLInterfaces Value="True"/>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="Unit1.pas"/>
<Line Value="1"/>
</Item1>
</BreakPoints>
</Debugging>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="31" Y="5"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="37"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<UnitName Value="FWZipConsts"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<UnitName Value="FWZipCrypt"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<UnitName Value="FWZipReader"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<UnitName Value="FWZipWriter"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="2"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectSession>
<SkipCheckLCLInterfaces Value="True"/>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="Unit1.pas"/>
<Line Value="1"/>
</Item1>
</BreakPoints>
</Debugging>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="31" Y="5"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="Unit1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="18"/>
<CursorPos X="3" Y="35"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<UnitName Value="FWZipConsts"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<UnitName Value="FWZipCrypt"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<UnitName Value="FWZipReader"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<UnitName Value="FWZipWriter"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="2"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="1" HistoryIndex="0">
<Position1>
<Filename Value="Unit1.pas"/>
<Caret Line="1" Column="1" TopLine="37"/>
</Position1>
</JumpHistory>
</ProjectSession>
<SkipCheckLCLInterfaces Value="True"/>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="Unit1.pas"/>
<Line Value="1"/>
</Item1>
</BreakPoints>
</Debugging>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="31" Y="5"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="77"/>
<CursorPos X="1" Y="94"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<UnitName Value="FWZipConsts"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<UnitName Value="FWZipCrypt"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<UnitName Value="FWZipReader"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<UnitName Value="FWZipWriter"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="1502"/>
<CursorPos X="1" Y="1518"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="4" HistoryIndex="3">
<Position1>
<Filename Value="Unit1.pas"/>
<Caret Line="40" Column="41" TopLine="106"/>
</Position1>
<Position2>
<Filename Value="Unit1.pas"/>
<Caret Line="110" Column="32" TopLine="99"/>
</Position2>
<Position3>
<Filename Value="Unit1.pas"/>
<Caret Line="94" Column="1" TopLine="77"/>
</Position3>
<Position4>
<Filename Value="..\..\FWZipWriter.pas"/>
<Caret Line="1517" Column="56" TopLine="1502"/>
</Position4>
</JumpHistory>
</ProjectSession>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="Unit1.pas"/>
<Line Value="1"/>
</Item1>
</BreakPoints>
</Debugging>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<Units Count="8">
<Unit0>
<Filename Value="FWZipPerfomance.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="31" Y="5"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit0>
<Unit1>
<Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="77"/>
<CursorPos X="1" Y="94"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
<Unit2>
<Filename Value="..\..\FWZipConsts.pas"/>
<UnitName Value="FWZipConsts"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
<Filename Value="..\..\FWZipCrc32.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit3>
<Unit4>
<Filename Value="..\..\FWZipCrypt.pas"/>
<UnitName Value="FWZipCrypt"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
<Unit5>
<Filename Value="..\..\FWZipReader.pas"/>
<UnitName Value="FWZipReader"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit5>
<Unit6>
<Filename Value="..\..\FWZipStream.pas"/>
<UsageCount Value="20"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit6>
<Unit7>
<Filename Value="..\..\FWZipWriter.pas"/>
<UnitName Value="FWZipWriter"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="1502"/>
<CursorPos X="1" Y="1518"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit7>
</Units>
<General>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<JumpHistory Count="6" HistoryIndex="5">
<Position1>
<Filename Value="Unit1.pas"/>
<Caret Line="40" Column="41" TopLine="106"/>
</Position1>
<Position2>
<Filename Value="Unit1.pas"/>
<Caret Line="110" Column="32" TopLine="99"/>
</Position2>
<Position3>
<Filename Value="Unit1.pas"/>
<Caret Line="94" Column="1" TopLine="77"/>
</Position3>
<Position4>
<Filename Value="..\..\FWZipWriter.pas"/>
<Caret Line="1517" Column="56" TopLine="1502"/>
</Position4>
<Position5>
<Filename Value="..\..\FWZipWriter.pas"/>
<Caret Line="1518" Column="1" TopLine="1502"/>
</Position5>
<Position6>
<Filename Value="Unit1.pas"/>
<Caret Line="94" Column="1" TopLine="77"/>
</Position6>
</JumpHistory>
</ProjectSession>
<Debugging>
<BreakPoints Count="1">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="Unit1.pas"/>
<Line Value="1"/>
</Item1>
</BreakPoints>
</Debugging>
<EditorMacros Count="0"/>
</CONFIG>

View File

@@ -0,0 +1,244 @@
object Form1: TForm1
Left = 381
Top = 183
Width = 578
Height = 654
Caption = 'Тест производительности FWZip'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poScreenCenter
PixelsPerInch = 96
object GroupBox1: TGroupBox
Left = 8
Top = 8
Width = 527
Height = 105
Anchors = [akLeft, akTop, akRight]
Caption = 'Настройки сжатия'
TabOrder = 0
object LabeledEdit1: TLabeledEdit
Left = 14
Top = 26
Width = 469
Height = 21
Anchors = [akLeft, akTop, akRight]
EditLabel.Width = 149
EditLabel.Height = 13
EditLabel.Caption = 'Выберите папку для сжатия:'
TabOrder = 0
Text = 'D:\StroyInfo 5'
OnChange = LabeledEdit1Change
end
object Button1: TButton
Left = 489
Top = 24
Width = 26
Height = 25
Hint = 'Обзор...'
Anchors = [akTop, akRight]
Caption = '...'
ParentShowHint = False
ShowHint = True
TabOrder = 1
OnClick = Button1Click
end
object CheckBox1: TCheckBox
Left = 14
Top = 58
Width = 145
Height = 17
Caption = 'Шифровать при сжатии'
TabOrder = 2
OnClick = CheckBox1Click
end
object LabeledEdit2: TLabeledEdit
Left = 262
Top = 56
Width = 172
Height = 21
Anchors = [akLeft, akTop, akRight]
EditLabel.Width = 84
EditLabel.Height = 13
EditLabel.Caption = 'Укажите пароль'
Enabled = False
LabelPosition = lpLeft
TabOrder = 3
end
object Button2: TButton
Left = 440
Top = 55
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Сжать'
TabOrder = 4
OnClick = Button2Click
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 128
Width = 527
Height = 137
Anchors = [akLeft, akTop, akRight]
Caption = 'Настройки распаковки'
TabOrder = 1
object LabeledEdit3: TLabeledEdit
Left = 14
Top = 26
Width = 469
Height = 21
Anchors = [akLeft, akTop, akRight]
EditLabel.Width = 171
EditLabel.Height = 13
EditLabel.Caption = 'Выберите архив для распаковки:'
TabOrder = 0
OnChange = LabeledEdit3Change
end
object Button3: TButton
Left = 489
Top = 24
Width = 26
Height = 25
Hint = 'Обзор...'
Anchors = [akTop, akRight]
Caption = '...'
ParentShowHint = False
ShowHint = True
TabOrder = 1
OnClick = Button3Click
end
object CheckBox2: TCheckBox
Left = 14
Top = 58
Width = 145
Height = 17
Caption = 'Архив зашифрован'
TabOrder = 2
OnClick = CheckBox2Click
end
object LabeledEdit4: TLabeledEdit
Left = 262
Top = 56
Width = 167
Height = 21
Anchors = [akLeft, akTop, akRight]
EditLabel.Width = 84
EditLabel.Height = 13
EditLabel.Caption = 'Укажите пароль'
Enabled = False
LabelPosition = lpLeft
TabOrder = 3
end
object Button4: TButton
Left = 440
Top = 54
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Распаковать'
TabOrder = 4
OnClick = Button4Click
end
object Button6: TButton
Tag = 1
Left = 440
Top = 85
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Проверить'
TabOrder = 5
OnClick = Button4Click
end
end
object GroupBox3: TGroupBox
Left = 8
Top = 271
Width = 527
Height = 178
Anchors = [akLeft, akTop, akRight]
Caption = 'Производительность:'
TabOrder = 2
object Label1: TLabel
Left = 14
Top = 10
Width = 163
Height = 13
Caption = 'Текущий расход памяти: 0 байт'
end
object Label2: TLabel
Left = 14
Top = 29
Width = 163
Height = 13
Caption = 'Пиковый расход памяти: 0 байт'
end
object Label3: TLabel
Left = 14
Top = 48
Width = 166
Height = 13
Caption = 'Общее количество элементов: 0'
end
object Label4: TLabel
Left = 14
Top = 67
Width = 142
Height = 13
Caption = 'Общее размер элементов: 0'
end
object Label5: TLabel
Left = 14
Top = 95
Width = 501
Height = 13
Anchors = [akLeft, akTop, akRight]
AutoSize = False
end
object ProgressBar1: TProgressBar
Left = 14
Top = 114
Width = 498
Height = 17
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
end
object ProgressBar2: TProgressBar
Left = 14
Top = 137
Width = 498
Height = 17
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
end
object Button5: TButton
Left = 437
Top = 83
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Остановить'
TabOrder = 2
Visible = False
OnClick = Button5Click
end
end
object Memo1: TMemo
Left = 8
Top = 456
Width = 527
Height = 146
Anchors = [akLeft, akTop, akRight, akBottom]
ScrollBars = ssVertical
TabOrder = 3
end
object OpenDialog1: TOpenDialog
Left = 376
Top = 224
end
end

View File

@@ -0,0 +1,298 @@
////////////////////////////////////////////////////////////////////////////////
//
// ****************************************************************************
// * Project : FWZip - FWZipPerfomance
// * Purpose : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FWZip
// * Author : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Rouse_) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// * Copyright : <20> Fangorn Wizards Lab 1998 - 2013.
// * Version : 1.0.10
// * Home Page : http://rouse.drkb.ru
// * Home Blog : http://alexander-bagel.blogspot.ru
// ****************************************************************************
// * Stable Release : http://rouse.drkb.ru/components.php#fwzip
// * Latest Source : https://github.com/AlexanderBagel/FWZip
// ****************************************************************************
//
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
// ftp://ftp.info-zip.org/pub/infozip/doc/appnote-iz-latest.zip
// http://zlib.net/zlib-1.2.5.tar.gz
// http://www.base2ti.com/
//
unit Unit1;
interface
{$WARN SYMBOL_PLATFORM OFF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN UNIT_PLATFORM OFF}
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, FileCtrl, ComCtrls,
FWZipWriter, FWZipReader, FWZipConsts, Contnrs;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
LabeledEdit1: TLabeledEdit;
Button1: TButton;
CheckBox1: TCheckBox;
LabeledEdit2: TLabeledEdit;
Button2: TButton;
GroupBox2: TGroupBox;
LabeledEdit3: TLabeledEdit;
Button3: TButton;
CheckBox2: TCheckBox;
LabeledEdit4: TLabeledEdit;
Button4: TButton;
OpenDialog1: TOpenDialog;
GroupBox3: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ProgressBar1: TProgressBar;
ProgressBar2: TProgressBar;
Label5: TLabel;
Button5: TButton;
Button6: TButton;
Memo1: TMemo;
procedure CheckBox1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure LabeledEdit1Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure LabeledEdit3Change(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
InitialHeapSize, MaxHeapSize, AverageHeapSize: Int64;
TotalGetHeapStatusCount: Integer;
StopProcess: Boolean;
procedure OnProgress(Sender: TObject; const FileName: string;
Percent, TotalPercent: Byte; var Cancel: Boolean;
ProgressState: TProgressState);
procedure UpdateMemoryStatus;
procedure SetEnabledState(Value: Boolean);
procedure ClearZipData;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Dir: string;
begin
if SelectDirectory('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', '', Dir) then
LabeledEdit1.Text := Dir;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
I: Integer;
TotalSize: Int64;
Heap: THeapStatus;
TicCount: DWORD;
Item: TFWZipWriterItem;
Writer: TFWZipWriter;
begin
Writer := TFWZipWriter.Create;
try
DeleteFile(
IncludeTrailingPathDelimiter(LabeledEdit1.Text) + 'FWZipTest.zip');
Writer.AddFolder('', LabeledEdit1.Text, '');
TotalSize := 0;
InitialHeapSize := 0;
for I := 0 to Writer.Count - 1 do
begin
Item := Writer[I];
Inc(TotalSize, Item.Size);
Inc(InitialHeapSize, SizeOf(TCentralDirectoryFileHeaderEx));
if LabeledEdit2.Text <> '' then
begin
Item.Password := LabeledEdit2.Text;
Item.NeedDescriptor := True;
end;
end;
Label3.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' + IntToStr(Writer.Count);
Label4.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' + IntToStr(TotalSize);
Writer.OnProgress := OnProgress;
SetEnabledState(False);
try
Heap := GetHeapStatus;
Inc(InitialHeapSize, Heap.Overhead + Heap.TotalAllocated);
MaxHeapSize := 0;
AverageHeapSize := 0;
TotalGetHeapStatusCount := 0;
StopProcess := False;
TicCount := GetTickCount;
Writer.BuildZip(
IncludeTrailingPathDelimiter(LabeledEdit1.Text) + 'FWZipTest.zip');
if TotalGetHeapStatusCount = 0 then
TotalGetHeapStatusCount := 1;
ShowMessage(Format(
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD><EFBFBD>' + sLineBreak +
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD><EFBFBD>' + sLineBreak +
'<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
[MaxHeapSize, AverageHeapSize div TotalGetHeapStatusCount,
(GetTickCount - TicCount) div 1000]));
finally
SetEnabledState(True);
end;
finally
Writer.Free;
ClearZipData;
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
if OpenDialog1.Execute then
LabeledEdit3.Text := OpenDialog1.FileName;
end;
procedure TForm1.Button4Click(Sender: TObject);
var
I: Integer;
TotalSize: Int64;
Heap: THeapStatus;
TicCount: DWORD;
Path: string;
Reader: TFWZipReader;
begin
SetLength(Path, MAX_PATH);
Path := LabeledEdit3.Text;
Path := ChangeFileExt(Path, '');
Reader := TFWZipReader.Create;
try
Reader.LoadFromFile(LabeledEdit3.Text);
TotalSize := 0;
for I := 0 to Reader.Count - 1 do
Inc(TotalSize, Reader[I].UncompressedSize);
Label3.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' + IntToStr(Reader.Count);
Label4.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' + IntToStr(TotalSize);
Reader.OnProgress := OnProgress;
if LabeledEdit4.Text <> '' then
Reader.PasswordList.Add(LabeledEdit4.Text);
SetEnabledState(False);
try
Heap := GetHeapStatus;
InitialHeapSize := Heap.Overhead + Heap.TotalAllocated;
MaxHeapSize := 0;
AverageHeapSize := 0;
TotalGetHeapStatusCount := 0;
StopProcess := False;
Memo1.Lines.Clear;
TicCount := GetTickCount;
if TButton(Sender).Tag = 0 then
Reader.ExtractAll(Path)
else
Reader.Check;
if TotalGetHeapStatusCount = 0 then
TotalGetHeapStatusCount := 1;
ShowMessage(Format(
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD><EFBFBD>' + sLineBreak +
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD><EFBFBD>' + sLineBreak +
'<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
[MaxHeapSize, AverageHeapSize div TotalGetHeapStatusCount,
(GetTickCount - TicCount) div 1000]));
finally
SetEnabledState(True);
end;
finally
Reader.Free;
ClearZipData;
end;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
StopProcess := True;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
LabeledEdit2.Enabled := CheckBox1.Checked;
end;
procedure TForm1.CheckBox2Click(Sender: TObject);
begin
LabeledEdit4.Enabled := CheckBox2.Checked;
end;
procedure TForm1.ClearZipData;
begin
Label1.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 0 <20><><EFBFBD><EFBFBD>';
Label2.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 0 <20><><EFBFBD><EFBFBD>';
Label3.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 0';
Label4.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 0';
Label5.Caption := '';
end;
procedure TForm1.LabeledEdit1Change(Sender: TObject);
begin
Button2.Enabled := DirectoryExists(LabeledEdit1.Text);
end;
procedure TForm1.LabeledEdit3Change(Sender: TObject);
begin
Button4.Enabled := FileExists(LabeledEdit3.Text);
end;
procedure TForm1.OnProgress(Sender: TObject; const FileName: string; Percent,
TotalPercent: Byte; var Cancel: Boolean; ProgressState: TProgressState);
const
p: array [TProgressState] of string = ('psStart', 'psInitialization',
'psInProgress', 'psFinalization', 'psEnd', 'psException');
begin
Cancel := StopProcess;
Label5.Caption := Format('(%d) %s', [Percent, FileName]);
ProgressBar1.Position := Percent;
ProgressBar2.Position := TotalPercent;
Memo1.Lines.Add(Format('%s - %s percent %d total %d',
[FileName, P[ProgressState], Percent, TotalPercent]));
UpdateMemoryStatus;
end;
procedure TForm1.SetEnabledState(Value: Boolean);
begin
Button1.Enabled := Value;
Button2.Enabled := Value;
Button3.Enabled := Value;
Button4.Enabled := Value;
Button5.Visible := not Value;
Button6.Enabled := Value;
LabeledEdit1.Enabled := Value;
LabeledEdit2.Enabled := Value;
LabeledEdit3.Enabled := Value;
LabeledEdit4.Enabled := Value;
CheckBox1.Enabled := Value;
CheckBox2.Enabled := Value;
end;
procedure TForm1.UpdateMemoryStatus;
var
HeapStatus: THeapStatus;
HeapSize: Int64;
begin
HeapStatus := GetHeapStatus;
HeapSize := HeapStatus.Overhead + HeapStatus.TotalAllocated;
Dec(HeapSize, InitialHeapSize);
if HeapSize > MaxHeapSize then
MaxHeapSize := HeapSize;
Inc(TotalGetHeapStatusCount);
Inc(AverageHeapSize, HeapSize);
Label1.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' + IntToStr(HeapSize) + ' <20><><EFBFBD><EFBFBD>';
Label2.Caption := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ' + IntToStr(MaxHeapSize) + ' <20><><EFBFBD><EFBFBD>';
Application.ProcessMessages;
Application.ProcessMessages;
end;
end.

View File

@@ -0,0 +1,299 @@
////////////////////////////////////////////////////////////////////////////////
//
// ****************************************************************************
// * Project : FWZip - FWZipPerfomance
// * Purpose : Тестирование производительности FWZip
// * Author : Александр (Rouse_) Багель
// * Copyright : © Fangorn Wizards Lab 1998 - 2013.
// * Version : 1.0.10
// * Home Page : http://rouse.drkb.ru
// * Home Blog : http://alexander-bagel.blogspot.ru
// ****************************************************************************
// * Stable Release : http://rouse.drkb.ru/components.php#fwzip
// * Latest Source : https://github.com/AlexanderBagel/FWZip
// ****************************************************************************
//
// Используемые источники:
// ftp://ftp.info-zip.org/pub/infozip/doc/appnote-iz-latest.zip
// http://zlib.net/zlib-1.2.5.tar.gz
// http://www.base2ti.com/
//
unit Unit1;
{$MODE Delphi}
interface
{$WARN SYMBOL_PLATFORM OFF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN UNIT_PLATFORM OFF}
uses
LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, FileCtrl, ComCtrls, FileUtil,
FWZipWriter, FWZipReader, FWZipConsts, Contnrs;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
LabeledEdit1: TLabeledEdit;
Button1: TButton;
CheckBox1: TCheckBox;
LabeledEdit2: TLabeledEdit;
Button2: TButton;
GroupBox2: TGroupBox;
LabeledEdit3: TLabeledEdit;
Button3: TButton;
CheckBox2: TCheckBox;
LabeledEdit4: TLabeledEdit;
Button4: TButton;
OpenDialog1: TOpenDialog;
GroupBox3: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ProgressBar1: TProgressBar;
ProgressBar2: TProgressBar;
Label5: TLabel;
Button5: TButton;
Button6: TButton;
Memo1: TMemo;
procedure CheckBox1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure LabeledEdit1Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure LabeledEdit3Change(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
InitialHeapSize, MaxHeapSize, AverageHeapSize: Int64;
TotalGetHeapStatusCount: Integer;
StopProcess: Boolean;
procedure OnProgress(Sender: TObject; const FileName: string;
Percent, TotalPercent: Byte; var Cancel: Boolean;
ProgressState: TProgressState);
procedure UpdateMemoryStatus;
procedure SetEnabledState(Value: Boolean);
procedure ClearZipData;
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Dir: string;
begin
if SelectDirectory('Укажите папку для сжатия', '', Dir) then
LabeledEdit1.Text := Dir;
end;
procedure TForm1.Button2Click(Sender: TObject);
var
I: Integer;
TotalSize: Int64;
Heap: THeapStatus;
TicCount: DWORD;
Item: TFWZipWriterItem;
Writer: TFWZipWriter;
begin
Writer := TFWZipWriter.Create;
try
DeleteFileUTF8(IncludeTrailingPathDelimiter(LabeledEdit1.Text) + 'FWZipTest.zip'); { *Converted from DeleteFile* }
Writer.AddFolder('', LabeledEdit1.Text, '');
TotalSize := 0;
InitialHeapSize := 0;
for I := 0 to Writer.Count - 1 do
begin
Item := Writer[I];
Inc(TotalSize, Item.Size);
Inc(InitialHeapSize, SizeOf(TCentralDirectoryFileHeaderEx));
if LabeledEdit2.Text <> '' then
begin
Item.Password := LabeledEdit2.Text;
Item.NeedDescriptor := True;
end;
end;
Label3.Caption := 'Общее количество элементов: ' + IntToStr(Writer.Count);
Label4.Caption := 'Общий размер элементов: ' + IntToStr(TotalSize);
Writer.OnProgress := OnProgress;
SetEnabledState(False);
try
Heap := GetHeapStatus;
Inc(InitialHeapSize, Heap.Overhead + Heap.TotalAllocated);
MaxHeapSize := 0;
AverageHeapSize := 0;
TotalGetHeapStatusCount := 0;
StopProcess := False;
TicCount := GetTickCount;
Writer.BuildZip(
IncludeTrailingPathDelimiter(LabeledEdit1.Text) + 'FWZipTest.zip');
if TotalGetHeapStatusCount = 0 then
TotalGetHeapStatusCount := 1;
ShowMessage(Format(
'Пиковый расход памяти: %d байт' + sLineBreak +
'Средний расход памяти: %d байт' + sLineBreak +
'Общее время работы: %d секунд',
[MaxHeapSize, AverageHeapSize div TotalGetHeapStatusCount,
(GetTickCount - TicCount) div 1000]));
finally
SetEnabledState(True);
end;
finally
Writer.Free;
ClearZipData;
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
if OpenDialog1.Execute then
LabeledEdit3.Text := OpenDialog1.FileName;
end;
procedure TForm1.Button4Click(Sender: TObject);
var
I: Integer;
TotalSize: Int64;
Heap: THeapStatus;
TicCount: DWORD;
Path: string;
Reader: TFWZipReader;
begin
SetLength(Path, MAX_PATH);
Path := LabeledEdit3.Text;
Path := ChangeFileExt(Path, '');
Reader := TFWZipReader.Create;
try
Reader.LoadFromFile(LabeledEdit3.Text);
TotalSize := 0;
for I := 0 to Reader.Count - 1 do
Inc(TotalSize, Reader[I].UncompressedSize);
Label3.Caption := 'Общее количество элементов: ' + IntToStr(Reader.Count);
Label4.Caption := 'Общий размер элементов: ' + IntToStr(TotalSize);
Reader.OnProgress := OnProgress;
if LabeledEdit4.Text <> '' then
Reader.PasswordList.Add(LabeledEdit4.Text);
SetEnabledState(False);
try
Heap := GetHeapStatus;
InitialHeapSize := Heap.Overhead + Heap.TotalAllocated;
MaxHeapSize := 0;
AverageHeapSize := 0;
TotalGetHeapStatusCount := 0;
StopProcess := False;
Memo1.Lines.Clear;
TicCount := GetTickCount;
if TButton(Sender).Tag = 0 then
Reader.ExtractAll(Path)
else
Reader.Check;
if TotalGetHeapStatusCount = 0 then
TotalGetHeapStatusCount := 1;
ShowMessage(Format(
'Пиковый расход памяти: %d байт' + sLineBreak +
'Средний расход памяти: %d байт' + sLineBreak +
'Общее время работы: %d секунд',
[MaxHeapSize, AverageHeapSize div TotalGetHeapStatusCount,
(GetTickCount - TicCount) div 1000]));
finally
SetEnabledState(True);
end;
finally
Reader.Free;
ClearZipData;
end;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
StopProcess := True;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
LabeledEdit2.Enabled := CheckBox1.Checked;
end;
procedure TForm1.CheckBox2Click(Sender: TObject);
begin
LabeledEdit4.Enabled := CheckBox2.Checked;
end;
procedure TForm1.ClearZipData;
begin
Label1.Caption := 'Текущий расход памяти: 0 байт';
Label2.Caption := 'Пиковый расход памяти: 0 байт';
Label3.Caption := 'Общее количество элементов: 0';
Label4.Caption := 'Общий размер элементов: 0';
Label5.Caption := '';
end;
procedure TForm1.LabeledEdit1Change(Sender: TObject);
begin
Button2.Enabled := DirectoryExistsUTF8(LabeledEdit1.Text); { *Converted from DirectoryExists* }
end;
procedure TForm1.LabeledEdit3Change(Sender: TObject);
begin
Button4.Enabled := FileExistsUTF8(LabeledEdit3.Text); { *Converted from FileExists* }
end;
procedure TForm1.OnProgress(Sender: TObject; const FileName: string; Percent,
TotalPercent: Byte; var Cancel: Boolean; ProgressState: TProgressState);
const
p: array [TProgressState] of string = ('psStart', 'psInitialization',
'psInProgress', 'psFinalization', 'psEnd', 'psException');
begin
Cancel := StopProcess;
Label5.Caption := Format('(%d) %s', [Percent, FileName]);
ProgressBar1.Position := Percent;
ProgressBar2.Position := TotalPercent;
Memo1.Lines.Add(Format('%s - %s percent %d total %d',
[FileName, P[ProgressState], Percent, TotalPercent]));
UpdateMemoryStatus;
end;
procedure TForm1.SetEnabledState(Value: Boolean);
begin
Button1.Enabled := Value;
Button2.Enabled := Value;
Button3.Enabled := Value;
Button4.Enabled := Value;
Button5.Visible := not Value;
Button6.Enabled := Value;
LabeledEdit1.Enabled := Value;
LabeledEdit2.Enabled := Value;
LabeledEdit3.Enabled := Value;
LabeledEdit4.Enabled := Value;
CheckBox1.Enabled := Value;
CheckBox2.Enabled := Value;
end;
procedure TForm1.UpdateMemoryStatus;
var
HeapStatus: THeapStatus;
HeapSize: Int64;
begin
HeapStatus := GetHeapStatus;
HeapSize := HeapStatus.Overhead + HeapStatus.TotalAllocated;
Dec(HeapSize, InitialHeapSize);
if HeapSize > MaxHeapSize then
MaxHeapSize := HeapSize;
Inc(TotalGetHeapStatusCount);
Inc(AverageHeapSize, HeapSize);
Label1.Caption := 'Текущий расход памяти: ' + IntToStr(HeapSize) + ' байт';
Label2.Caption := 'Пиковый расход памяти: ' + IntToStr(MaxHeapSize) + ' байт';
Application.ProcessMessages;
Application.ProcessMessages;
end;
end.