The components
- Interface
- Versions
- And in the future..
- Legal issues
- Download
DelphiZlib 0.2.1
Yes, this is version 0.2.1. It doesn't mean this component is not usable,
it means that I'm not sure if I like it the way it works now. Until I release
version 1.0.0 some property's could change.
Please read the legal notes at the end of this file.
DelphiZlib is based on the zlib 1.1.2 general purpose data compression
library. The original Zlib library can be found on http://www.info-zip.org/pub/infozip/zlib/
The Pascal implementation I used is by Jacques Nomssi Nzali. Because
he did such a great job, writing this component was easy. I changed only
a few bytes in the original code in order to avoid some compilation-warnings.
I did only include the files I needed for this component. Some of them
I changed a bit. For the complete and original PASZLIB-code I refer to:
http://www.tu-chemnitz.de/~nomssi/paszlib.html
Read also paszlib.txt, which is in fact the original
readme.txt by Jacques Nomssi Nzali and contains more information. [And
yes, I copied some lines from this file]
--top--
The components
The components can be used after installing it the normal way in Delphi
4. Someone told me it also works for Delphi 5 and I guess it will also
work for Delphi 3 and would appreciate when somebody can mail me if it
indeed works. Please ignore the compiler hints. I did not yet clean up
or optimize the code.
To install (Delphi 4):
Just unpack the zip-file into a directory where you want to keep your
components. Then choose [File],[Open] and select the file
'DelphiZlib.dpk'. In the new window you should choose [install].
The component will be placed under [samples]
--top--
Interface
TGzip:
Properties
About |
guess what :-) |
Comments |
Comments to include into the header of a gzip-file when property GZipHeader
is properly set. |
CompressionLevel |
Value from 1-9. A higher level is slower and not necessary better. |
CompressionType |
Standard, Filtered, HuffmanOnly |
DeleteSource |
If set the source-file will be deleted after (de)compression. Although
on UNIX/Linux this is standard behavior I decided to set this to FALSE |
FileDestination |
File to write the (de)compressed file to |
FileSource |
File to (de)compress |
GzipComments |
String containing the comments of a gzipped file after a call of getGzipHeader. |
GzipFilename |
String containing the filename of a gzipped file after a call of getGzipHeader. |
GZipHeader
- filename
- comment |
Add the original filename (FileSource) and Comments to the header when
gzipping a file. |
Progress |
Percentage of data that is already processed. |
ProgressStep |
Value from 0..100. A value of 11 generates an event when 11%, 22%,
33%, ... 99%, 100% of the data is processed. 0 disables this event and
100 only triggers the event when all the data is processed. |
WindowOnError |
If set, the component will show a message to the user. You can disable
this and inform (or not) the user the way you want. |
Functions
Gzip |
Start compressing |
Gunzip |
Start decompressing |
fileswitch |
Swap the filenames in FileSource and FileDestination |
getGzipHeader |
Sets GzipFilename and GzipComments to the values from the header of
FileSource. |
Events
OnProgress |
After completion of ..% (see ProgressStep) this event will be triggered. |
|
TCrc32
Properties
About |
guess what :-) |
Crc32FileName |
Name of the file from which to compute the Crc32 value. |
Progress |
Percentage of data that is already processed. |
ProgressStep |
Value from 0..100. A value of 11 generates an event when 11%, 22%,
33%, ... 99%, 100% of the data is processed. 0 disables this event and
100 only triggers the event when all the data is processed. |
WindowOnError |
If set, the component will show a message to the user. You can disable
this and inform (or not) the user the way you want. |
Functions
CalcCrc32 |
Returns the Crc32 value of the file denoted in Crc32FileName. |
CalcCrc32_hex |
Returns a string representing the hexadecimal Crc32 value of the file
denoted in Crc32FileName. |
Events
OnProgress |
After completion of ..% (see ProgressStep) this event will be triggered. |
|
TAdler32
Properties
About |
guess what :-) |
Adler32FileName |
Name of the file from which to compute the Adler32 value. |
Progress |
Percentage of data that is already processed. |
ProgressStep |
Value from 0..100. A value of 11 generates an event when 11%, 22%,
33%, ... 99%, 100% of the data is processed. 0 disables this event and
100 only triggers the event when all the data is processed. |
WindowOnError |
If set, the component will show a message to the user. You can disable
this and inform (or not) the user the way you want. |
Functions
CalcAdler32 |
Returns the Adler32 value of the file denoted in Adler32FileName. |
CalcAdler32_hex |
Returns a string representing the hexadecimal Adler32 value of the
file denoted in Adler32FileName. |
Events
OnProgress |
After completion of ..% (see ProgressStep) this event will be triggered. |
|
--top--
Versions
0.2.2:
-
Small bugfix in getGzipHeader.
0.2.1:
-
TGzip: Removed path-information from FileSource when storing in gzip-header.
0.2.0:
-
Implemented basic header-functionality to TGzip
-
Fixed bug in TGzip.gunzip
0.1.0:
-
Added TCrc32
-
Added TAdler32
-
Fixed returning error-value from TGzip
-
Added OnProgress-event to TGzip
-
Added delphizlib.pkg package
-
Renamed project from DelphiGzip to DelphiZlib
0.0.0:
--top--
And in the future..
Unfortunately I don't have much time at the moment, so don't expect me
to fully develop this component into a new WinZip. When I'll have more
time I'll start writing a TZip component also based on the Zlib library.
Please let me know if I should add or change something.
--top--
Legal issues
Copyright (C) 2000 by Vincent Nikkelen
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
--top--
Download:
DelphiZlib homepage: http://www.stack.nl/~vincentn/delphizlib/
Download DelphiZlib: http://www.stack.nl/~vincentn/delphizlib/delphizlib.zip
(111 kb)
ConeGen homepage: http://www.stack.nl/~vincentn/ConeGen/index.html
--top--
Vincent Nikkelen (vincentn@stack.nl)
August 23, 2000 |