This is an offline version of the homepage and documentation , to access the homepage and the documentation online visit:

http://www.binarywork.net/zstrcom.htm

 
Last update 11/04/2001

BinaryWork Zlib StringCompress OCX 3.0.0 - BWDC


(Release date 11/04/2001)

ActiveX OCX to compress strings or files with a very fast implementation of the Zlib or Gzip compression method

 

Description and features
Operating System Compliance
What is new
Speed comparison
Documentation online
Download the shareware packages
How to register and use a licensed version
License information


Description and features :

This control can compress strings or files , with support to Unicode characters via Richtextbox , the compression method was enhanced with our BWDC implementation , due to this optimization this control can compress and decompress files faster than our BW Zip Compress OCX 3.0.99 or Winzip , and when compared with the old version 2.1.0 the new 3.0.0 can be up to 1600 % faster when compressing very large files

This new version can compress files up to 2 gigabytes

The BWDC optimization provide also the possibility to load the compression functions only when required , and it can be removed from the memory after the execution , this will make more memory available to the application running the control

Added also CPU detection code , it will provide all the important features available in the processor , and many of the features that this code can detect are not being used at this moment , but in the future the software will be optimizedto use these features when available

The errors and warnings are reported with description , it will make it easy to be used during design mode , because the errors are self explanatory
 


Information to licensed users

Due to the large number of bugs fixeds in this version is highly recommended the upgrade of this control by any licensed user

Just send an email to us and we will email to you the new release without charge , indeed , any upgrade is free


Operating System Compliance :Windows 95 , Windows 98 , Windows NT 4.0 , Windows 2000


What is new in version 3.0.0 (Release date 11/04/2001)

1- Added BWDC optimization

2- Enhanced the speed execution when compressing or decompressing large files

3- Added CPU detection code

4- Fixed bug when compressing or decompressing very large files

5- Added support to Unicode characters via Richtextbox RTF format 

6 - Added more error handlings and warning event

7- Fixed minor bugs

What is new in version 2.1 (Release date 13/01/2000)

The zlib DLL doesnot need to be redistributed , now this is part of the control , fixed the method used to return errors , this new version will not show popup error messages anymore , any error is reported in the ErrorCode event , fixed a bug occurring in the return code of the funtions in case of errors , improvements in the compression and decompression functions

What is new in version 1.5 (Release date 01/05/1999)

This new version is at least 5 times faster than the version 1.3 , and now the file is generated in the Gzip format , and can be decompressed by Winzip
 


Speed comparison

This is a small comparison between BW Zlib StringCompress , BW Zip Compress OCX and Winzip

And this comparison will show the speed enhancements added to the version 3.0.0 of the BW Zlib StringCompress OCX

Anyone is welcome to test the speed execution in their own machines , and let us know if you have found another gzip based software that can compress and decompress gzip files faster than BW Zlib StringCompress OCX 3.0.0

Amount of time in seconds to compress a file

Size of the uncompressed file BW ZLib StringCompress OCX 3.0.0 - BWDC  Winzip 7 SR-1 BW Zip Compress OCX 3.0.99 BW Zlib StringCompress OCX 2.1.0
2 mb 3.6 3.8 3.9 4.0
10 mb 13 14 14 30
20 mb 25 28 28 341

Amount of time in seconds to decompress a file

Size of the uncompressed file BW ZLib StringCompress OCX 3.0.0 - BWDC  Winzip 7 SR-1 BW Zip Compress OCX 3.0.99 BW Zlib StringCompress OCX 2.1.0
2 mb uncompressed

1 mb compressed

0.379 1 1 2.8
10 mb uncompressed

3,2 mb compressed

2.0 4 4 33
20 mb uncompressed

6,4 mb compressed

7.7 10 8.2 --


 


Documentation

Last modified on 11 , Abril , 2001 - 10:27 AM

BW Zlib StringCompress OCX 3.0.0 - BWDC - Documentation
 

More information and description will be added soon

How to read this documentation : We have splitted the information with some specific colors

Blue to the information that have not changed since the last release

Green to the information that have changed since the last release

Red to the information that is really important to avoid bugs in your software
 
 

If you dont have time to read the entire documentation , remember to read at least the Red section , it may avoid problems in your software
 
 
List of functions , properties , methods and events


Function About()
Member of BWZlib300b.BWZlib
To show the aboutbox of the control

Function ControlName() As String
Member of BWZlib300b.BWZlib
This will return the name of the control

Function Documentation()
Member of BWZlib300b.BWZlib
This function will start your default browser and connect you to the documentation online

Event Errorcode(Errorcode As Long, ErrorDescription As String)
Member of BWZlib300b.BWZlib
This event will return the errors generated in the control and the description also

The possible errors are :

1 = "The gzopen() for write call failed."
2 = "The gzwrite() call returned an error"
3 = "The gzclose() called failed."
4 = "The gzopen() for read call failed."
5 = "The gzread() call failed"
6 = "Unable to unload the BWDC functions"
7 = "Unable to load the BWDC functions"
8 = "The file don't exist ( or the file is a system file )"
9 = "Unable to open the file"
10 = "Unexpected error"
11 = "Error in the ZlibCompressFile function"
12 = "The compression level passed is invalid , min 0 max 9"
13 = "Error in the ZlibUnCompressFile function"
14 = "The input file cannot be the output file"
15 = "There was not enough memory for the operation"
16 = "There was not enough room in the output buffer"
17 = "Level paramemer invalid"
18 = "Error in the ZlibCompress function"
19 = "Error in the ZlibUnCompress function"
20 = "Invalid header in the string , check the documentation"
21 = "Input data was corrupted"
Any other value = "Unexpected error"

Event GetCPUInfo(VendorName As String, CPUModelName As String, HasMMXSupport As Boolean, HasSSESupport As Boolean, HasSSE2Support As Boolean, Has3DNowSupport As Boolean, Has_OS_SupportToMMX As Boolean, Has_OS_SupportToSSE As Boolean, Has_OS_SupportToSSE2 As Boolean, Has_OS_SupportTo3DNow As Boolean)
Member of BWZlib300b.BWZlib
Event raised when the function GetCPUInformation is called , the info can be used to show the family , model and other information about the CPU , internally , this information will be used to optimize the code for specific CPUs 

VendorName: The name of the vendor
CPUModelName: The model name
HasMMXSupport: If the CPU has support to MMX this flag will be true
HasSSESupport: If the CPU has support to SSE this flag will be true
HasSSE2Support: If the CPU has support to SSE2 this flag will be true
Has3DNowSupport: If the CPU has support to 3dNow! this flag will be true 
Has_OS_SupportToMMX: If the OS has support to MMX this flag will be true 
Has_OS_SupportToSSE: If the OS has support to SSE this flag will be true 
Has_OS_SupportToSSE2: If the OS has support to SSE2 this flag will be true 
Has_OS_SupportTo3DNow: If the OS has support to 3DNow! this flag will be true 

We are already working with CPU specific code it will add speed enhancements in our software that will make older versions totally obsolete

At this moment this is in a starting point and more information and new features will be added to this new implementation , the name of this new implementation is BWDC and you can find more information about this new CPU enhancements in the folowing link: http://www.binarywork.net/bwdc.htm

Function GetCPUInformation() As Boolean
Member of BWZlib300b.BWZlib
This function is used to raise the event GetCPUInfo with all the information about the processor , return true if ok or false otherwise , check the documentation and the GetCPUInfo event for more information.

After calling this function , the event GetCPUInfo will be raised , just fill a listbox or a listview with the information

After now each software released by us will have the CPU detection code

Function Help()
Member of BWZlib300b.BWZlib
This function will start your default browser and connect you to the documentation online

After calling this function , a messagebox asking you about whether you want to connect to the documentation online will appear , click yes to connect or no to return the control to the design mode

Function LastError() As Long
Member of BWZlib300b.BWZlib
This function will return the number of the last error occurred in the control , check the documentation for the description of the error , or check the Errorcode event.

This function can be used to check for errors after a call to the compression or decompression function

The description of the possible errors are : 

1 = "The gzopen() for write call failed."
2 = "The gzwrite() call returned an error"
3 = "The gzclose() called failed."
4 = "The gzopen() for read call failed."
5 = "The gzread() call failed"
6 = "Unable to unload the BWDC functions"
7 = "Unable to load the BWDC functions"
8 = "The file don't exist ( or the file is a system file )"
9 = "Unable to open the file"
10 = "Unexpected error"
11 = "Error in the ZlibCompressFile function"
12 = "The compression level passed is invalid , min 0 max 9"
13 = "Error in the ZlibUnCompressFile function"
14 = "The input file cannot be the output file"
15 = "There was not enough memory for the operation"
16 = "There was not enough room in the output buffer"
17 = "Level paramemer invalid"
18 = "Error in the ZlibCompress function"
19 = "Error in the ZlibUnCompress function"
20 = "Invalid header in the string , check the documentation"
21 = "Input data was corrupted"
Any other value = "Unexpected error"

Function LoadBWDCFunctions() As Boolean
Member of BWZlib300b.BWZlib
This function will load the BWDC functions in the same address space of the application , we have added this option to optimize the utilization of the memory 

This function will optimize the utilization of the compression functions

Calling this before the utilization of any compression or decompression function will load the functions in the same address space of the application utilizing the control

If you forgot load the functions before the utilization , the control will automatically load the functions , but a warning event will be raised

If you forgot to load the BWDC function , then in the first call to the compression or decompression functions the operating system will load the functions , but it will require a few seconds to alocate memory in the heap and locate the address to load , otherwise , if you load this before the execution the compression or decompression function the control will execute the compression or decompression function immediatelly , because the functions are already loaded and ready to be used

And you can unload the functions after the utilization , it will remove the functions from the address space of the application

If you want to know more about the BWDC implementation just check : http://www.binarywork.net/bwdc.htm

Function UnloadBWDCFunctions() As Boolean
Member of BWZlib300b.BWZlib
This function will remove the BWDC functions from the memory, so more memory will be available to your application , check the documentation for more explanations

Calling this after the utilization of any compression or decompression function will unload the functions from the address space of the application utilizing the control

Removing the functions from the address space of the application will make more memory available

If you want to know more about the BWDC implementation just check : http://www.binarywork.net/bwdc.htm

Event WarningCode(WarningCode As Long, WarningDescription As String)
Member of BWZlib300b.BWZlib
Raised in any warning reported by the control , the warnings are not errors , they are just reports about problems that will not affect the execution of the control but can be optimized or fixed to a better execution , check the documentation

The possible warnings are :
1 = "The functions are already unloaded"
2 = "The functions are already loaded"
3 = "Automatically loading BWDC functions"
Any other value = "Unexpected error "

Function ZlibCompress(StringToCompress As String, OutPutString As String) As Boolean
Member of BWZlib300b.BWZlib
This is the function to compress strings in the Zlib format , in the version 3.0.0 the speed execution was enhanced , and more error handlings was added also , the version 3.0.0 is the first version using BWDC optimization

The version 3.0.0 is the first version using BWDC , so this version is a lot faster than any older version , this control is even faster than BW Zip Compress OCX 3.0.99

StringToCompress: The string to be compressed
OutPutString: The destination string containing the compressed data

Information about the zlib format : In order to decompress the zlib data , we need to provide to the compressed string a header , this neader is required in order to reconstruct the data

To generate the string without the header using the default zlib method , just remove the information untill the first "," character 

The "," character is the delimiter of the compressed string , so a string without the header and the delimiter is a standard zlib format string and can be decompressed by any other zlib based software already available

More information about the compressed strig : This control is only able to compress strings containing characters from 0 to 255 , in order to compress string containing Unicode characters we recommend the utilization of the RTFtext method of Richtextbox

The version 2.0 and above of the richtextbox has support to Unicode characters in the RTF format , this mean that the richtextbox will show the Unicode string without problems and it will store it in the RTF format that is stored in the memory and in files with characters ranging from 0 to 255

Since the control is able to compress and decompress characters from 0 to 255 , the control is able to compress Unicode strings in the RTF format without problems

We are researching in the Unicode problem in order to add a more robust support to this problem and any comment from a Unicode guru is really apreciated

The sample project has more informations about the Unicode format

Function ZlibCompressFile(FiletoCompress As String, OutputFile As String, [CompressionLevel As String]) As Boolean
Member of BWZlib300b.BWZlib
This is the function to compress files in the Gzip format , due to a bug in the version 2.1.0 the version 3.0.0 can compress large files 1600 % faster , and the CompressionLevel variable will define the compression level , min 0 , max 9

In the version 3.0.0 we have replaced the majority of the code with BWDC , so this version is a lot faster than the version 2.1.0 , and it is even faster than our BW Zip Compress OCX 3.0.99 or Winzip , at this moment this control is our fastest file compressor , and the speed execution will become more faster with new versions due to the optimization that we will introduce in the future versions

This function will compress files in the Gzip format , and the gzip format is supported by Winzip , in order to make the file load in Winzip , just rename the extension to .gz , doing it the Winzip will understand that this is a gzip file and will decompress it

For example , a gzip file with the name and extension "file.txt.gz" , will be treated in Winzip as "file.txt"

Winzip 6.0 and above is required to decompress the gzip file

FiletoCompress: The input file to be compressed , and the input file cannot be the output file , an error will be generated if the input and output are the same file

OutputFile: The output file , and the output file will be generated in the Gzip format , and this control at this moment is our fastest file compressor available

CompressionLevel: The compression level , the minimum value is 0 , in this case the file will be only stored in the destination file , the maximum value is 9 , in this case the best compression will be used , this parameter is optional , then omitting it in the call to the funtion will use the default compression value 6

Function ZlibUncompress(StringToUncompress As String, OutPutString As String) As Boolean
Member of BWZlib300b.BWZlib
This is the function to uncompress strings in the Zlib format , in the version 3.0.0 the speed execution was enhanced , and more error handlings was added also , the version 3.0.0 is the first version using BWDC optimization

Function ZlibUnCompressFile(FiletoUnCompress As String, OutputFile As String) As Boolean
Member of BWZlib300b.BWZlib
This is the function to uncompress files in the Gzip format , due to a bug in the version 2.1.0 the version 3.0.0 can uncompress large files 1200 % faster , check the documentation for more explanations

This is the function that will decompress the gzip files

And it is able to decompress also gzip files created with other compression tools

If the file is a gzip file it will be decompressed by this function without problem

Due to the speed enhancements provided by BWDC , this function can be up to 1600 % faster than older versions when decompressing very large files, and it is faster than our BW Zip Compress OCX or Winzip

FiletoUnCompress: The file to be decompressed

OutputFile: The output decompressed file

The sample project has a few comments that will explain more about the control , and more information will be added here soon

For more explanations or specific problems just send email with your requirements to info@binarywork.net


Download

The package available to download include the OCX installation program , description files and a VB sample project  exploring any possibilities of the OCX

BinaryWork Zlib StringCompress 3.0.0 OCX - BWDC - VB6(SP5)

BinaryWork Zlib StringCompress 3.0.0 OCX - BWDC - VB6(SP3)

BinaryWork Zlib StringCompress 3.0.0 OCX - BWDC - VB5(SP3)

BinaryWork StringCompress 2.1.0 OCX VB6(SP3)

BinaryWork StringCompress 2.1.0 OCX VB5(SP3)

BinaryWork StringCompress 1.5.0 OCX VB5(SP3)


Registration

This software isnot sold , this software is licensed , with the registration you will acquire the rights to receive and use the licensed version in your projects

Select what is the best place to register this software online :

Link to register the 3.0.0 version

And don't forget to take a look in the License Information
 
 


BinaryWork Corp.