Gzip ActiveX Reference Documentation

Gzip

Current Version: 11.4.0

This class provides functionality for working with GZIP compression in both file-based and in-memory scenarios. It supports compressing and decompressing:

  • Files (.gz, .tar.gz)
  • Strings (with charset conversion)
  • Binary data (byte[], BinData)
  • Encoded data (Base64, Hex, etc.)

It also allows embedding metadata such as filenames, timestamps, and comments within the GZIP format.

For an extended overview, see Gzip Class Overview.

Object Creation

Note:
For a specific major version, use "Chilkat.Gzip.<major_version>", such as "Chilkat.Gzip.10" for Chilkat v10.*.*
See Chilkat ActiveX Object Creation

(ASP)
set obj = Server.CreateObject("Chilkat.Gzip")

(AutoIt)
$obj = ObjCreate("Chilkat.Gzip")

(Visual Basic 6.0)
Dim obj As New ChilkatGzip

(VBScript)
set obj = CreateObject("Chilkat.Gzip")

(VBA, such as Excel)
Dim obj As New ChilkatGzip
See How to Use ActiveX in Excel

(Delphi)
obj := TChilkatGzip.Create(Self);

(FoxPro)
loObject = CreateObject('Chilkat.Gzip')

(PowerBuilder)
lole_object = create oleobject
li_rc = lole_object.ConnectToNewObject("Chilkat.Gzip")

(SQL Server)
EXEC @hr = sp_OACreate 'Chilkat.Gzip', @obj OUT

(Javascript)
var obj = new ActiveXObject("Chilkat.Gzip");

Properties

AbortCurrent
AbortCurrent As Long
Introduced in version 9.5.0.58

Set this property to 1 to request that the currently running operation be aborted. This is useful for long-running operations such as large file compression or decompression. Methods that complete quickly are generally not affected.

If no method is currently running, the property is automatically reset to 0 when the next method begins. After an abort occurs, it is also reset to 0. Both synchronous and asynchronous operations can be aborted. For synchronous calls, another thread must set this property.

top
Comment
Comment As String

An optional comment to embed in the Gzip file when a Compress* method is called.

top
CompressionLevel
CompressionLevel As Long
Introduced in version 9.5.0.50

Controls the compression level used when creating Gzip data. The value can range from 0 to 9.

  • 0 = no compression
  • 9 = maximum compression

The default value is 6, which is a typical balance between compression size and speed. Higher levels may take significantly more CPU time while producing only slightly smaller output, depending on the data.

top
DebugLogFilePath
DebugLogFilePath As String

If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. This logging helps identify the context and history of Chilkat calls leading up to any crash or hang, aiding in debugging.

Enabling the VerboseLogging property provides more detailed information. This property is mainly used for debugging rare instances where a Chilkat method call causes a hang or crash, which should generally not happen.

Possible causes of hangs include:

  • A timeout property set to 0, indicating an infinite timeout.
  • A hang occurring within an event callback in the application code.
  • An internal bug in the Chilkat code causing the hang.

top
ExtraData
ExtraData As Variant

Optional binary data to include in the Gzip header when a Compress* method is called.

top
Filename
Filename As String

The filename to embed in the Gzip file when a Compress* method is called. Some Gzip extraction tools use this embedded filename as the default output filename.

top
HeartbeatMs
HeartbeatMs As Long

Specifies the interval, in milliseconds, between AbortCheck event callbacks. These callbacks allow an application to cancel certain long-running operations before they finish.

The default value is 0, which means no AbortCheck callbacks are triggered.

More Information and Examples
top
LastBinaryResult
LastBinaryResult As Variant (read-only)

This property is mainly used in SQL Server stored procedures to retrieve binary data from the last method call that returned binary data. It is only accessible if Chilkat.Global.KeepBinaryResult is set to 1. This feature allows for the retrieval of large varbinary results in an SQL Server environment, which has restrictions on returning large data via method calls, though temp tables can handle binary properties.

top
LastErrorHtml
LastErrorHtml As String (read-only)

Provides HTML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastErrorText
LastErrorText As String (read-only)

Provides plain text information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastErrorXml
LastErrorXml As String (read-only)

Provides XML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastMethodSuccess
LastMethodSuccess As Long

Indicates the success or failure of the most recent method call: 1 means success, 0 means failure. This property remains unchanged by property setters or getters. This method is present to address challenges in checking for null or Nothing returns in certain programming languages. Note: This property does not apply to methods that return integer values or to boolean-returning methods where the boolean does not indicate success or failure.

top
LastModStr
LastModStr As String

Specifies the last-modified date/time to embed in the Gzip file when a Compress* method is called.

The value must be provided as an RFC 822 formatted date/time string.

Example:

Tue, 15 Nov 1994 12:45:26 GMT

If this property is not set, the current system date/time is used automatically.

top
LastStringResult
LastStringResult As String (read-only)

In SQL Server stored procedures, this property holds the string return value of the most recent method call that returns a string. It is accessible only when Chilkat.Global.KeepStringResult is set to TRUE. SQL Server has limitations on string lengths returned from methods and properties, but temp tables can be used to access large strings.

top
LastStringResultLen
LastStringResultLen As Long (read-only)

The length, in characters, of the string contained in the LastStringResult property.

top
UseCurrentDate
UseCurrentDate As Long

Controls the last-modified date/time assigned to files created by Uncompress* methods.

When set to 1, the extracted file uses the current date/time instead of the date/time stored in the Gzip data.

top
VerboseLogging
VerboseLogging As Long

If set to 1, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is 0. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

top
Version
Version As String (read-only)

Version of the component/library, such as "10.1.0"

top

Methods

CompressBd
CompressBd(binDat As ChilkatBinData) As Long
Introduced in version 9.5.0.67

Compresses the contents of a BinData object in place, replacing the original data with Gzip-compressed data.

Returns 1 for success, 0 for failure.

top
CompressBdAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressBdAsync(binDat As ChilkatBinData) As ChilkatTask
Introduced in version 9.5.0.67

Creates an asynchronous task to call the CompressBd method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressFile
CompressFile(srcPath As String, destPath As String) As Long

Compresses a file and writes the result as a Gzip file, typically with a .gz extension.

Returns 1 for success, 0 for failure.

top
CompressFileAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressFileAsync(srcPath As String, destPath As String) As ChilkatTask

Creates an asynchronous task to call the CompressFile method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressFile2
CompressFile2(srcPath As String, embeddedFilename As String, destPath As String) As Long

Compresses a file and writes the result as a Gzip file, while allowing a different filename to be embedded inside the Gzip data.

The inFilename parameter is the actual file on disk. The srcPath parameter is the filename stored in the Gzip header and may be used by extraction tools as the output filename.

Returns 1 for success, 0 for failure.

top
CompressFile2Async (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressFile2Async(srcPath As String, embeddedFilename As String, destPath As String) As ChilkatTask

Creates an asynchronous task to call the CompressFile2 method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressFileBd
CompressFileBd(filePath As String, bd As ChilkatBinData) As Long
Introduced in version 11.0.0

Compresses a file and stores the resulting Gzip data in a BinData object.

The compressed output is held in memory. The maximum compressed size is 4 GB.

Returns 1 for success, 0 for failure.

top
CompressFileBdAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressFileBdAsync(filePath As String, bd As ChilkatBinData) As ChilkatTask
Introduced in version 11.0.0

Creates an asynchronous task to call the CompressFileBd method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressFileToMem
CompressFileToMem(inFilename As String) As Variant

Compresses a file and returns the resulting Gzip data as a byte array.

The compressed output is held in memory and has a maximum size limit of 4 GB.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

top
CompressFileToMemAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressFileToMemAsync(inFilename As String) As ChilkatTask

Creates an asynchronous task to call the CompressFileToMem method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressMemory
CompressMemory(inData As Variant) As Variant

Compresses a byte array and returns the result as an in-memory Gzip image.

The uncompressed input data must not exceed 4 GB.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

top
CompressMemoryAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressMemoryAsync(inData As Variant) As ChilkatTask

Creates an asynchronous task to call the CompressMemory method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressMemToFile
CompressMemToFile(inData As Variant, destPath As String) As Long

Compresses a byte array and writes the resulting Gzip data to a file.

Returns 1 for success, 0 for failure.

top
CompressMemToFileAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressMemToFileAsync(inData As Variant, destPath As String) As ChilkatTask

Creates an asynchronous task to call the CompressMemToFile method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressSb
CompressSb(sb As ChilkatStringBuilder, charset As String, bd As ChilkatBinData) As Long
Introduced in version 11.0.0

Compresses the text contained in a StringBuilder and writes the Gzip-compressed result to a BinData object.

Before compression, the string is converted to bytes using the specified character set, such as utf-8, iso-8859-1, or shift_JIS.

Returns 1 for success, 0 for failure.

top
CompressSbAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressSbAsync(sb As ChilkatStringBuilder, charset As String, bd As ChilkatBinData) As ChilkatTask
Introduced in version 11.0.0

Creates an asynchronous task to call the CompressSb method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressString
CompressString(inStr As String, destCharset As String) As Variant

Compresses a string and returns the Gzip-compressed data as a byte array.

The string is first converted to bytes using the character set specified by destCharset. Common values include utf-8, iso-8859-1, and shift_JIS.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

More Information and Examples
top
CompressStringAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressStringAsync(inStr As String, destCharset As String) As ChilkatTask

Creates an asynchronous task to call the CompressString method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
CompressStringENC
CompressStringENC(inStr As String, charset As String, encoding As String) As String

Compresses a string and returns the Gzip-compressed data as an encoded string.

The input string is first converted to bytes using the specified character set. The compressed binary data is then encoded using the requested encoding, such as base64, hex, url, base32, or quoted-printable.

Returns Nothing on failure

top
CompressStringToFile
CompressStringToFile(inStr As String, destCharset As String, destPath As String) As Long

Compresses a string and writes the resulting Gzip data to a file.

The string is first converted to bytes using the character set specified by destCharset.

Returns 1 for success, 0 for failure.

top
CompressStringToFileAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
CompressStringToFileAsync(inStr As String, destCharset As String, destPath As String) As ChilkatTask

Creates an asynchronous task to call the CompressStringToFile method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
ExamineFile
ExamineFile(filePath As String) As Long

Checks whether the specified file contains Gzip-formatted data.

Returns 1 if the file is in Gzip format, or 0 otherwise.

top
ExamineMemory
ExamineMemory(inGzData As Variant) As Long

Checks whether the provided byte array contains Gzip-formatted data.

Returns 1 if the data is in Gzip format, or 0 otherwise.

top
IsGzip
IsGzip(bd As ChilkatBinData) As Long
Introduced in version 11.0.0

Checks whether the data contained in a BinData object is in Gzip format.

Returns 1 if the data is Gzip-formatted, or 0 otherwise.

top
LoadTaskCaller
LoadTaskCaller(task As ChilkatTask) As Long
Introduced in version 9.5.0.80

Loads the caller of the task's async method.

Returns 1 for success, 0 for failure.

top
SetDt
SetDt(dt As CkDateTime) As Long

Sets the last-modified date/time to embed in the Gzip file when a Compress* method is called.

If no date/time is explicitly set, the current system date/time is used.

Returns 1 for success, 0 for failure.

top
SetExtraData
SetExtraData(encodedData As String, encoding As String) As Long
Introduced in version 11.0.0

Sets optional extra binary data to include in the Gzip header when a Compress* method is called.

The data is passed as an encoded string. Supported encodings include base64, hex, ascii, and many others.

Returns 1 for success, 0 for failure.

More Information and Examples
top
UncompressBd
UncompressBd(binDat As ChilkatBinData) As Long
Introduced in version 9.5.0.67

Decompresses Gzip data contained in a BinData object in place, replacing the compressed data with the uncompressed data.

Returns 1 for success, 0 for failure.

top
UncompressBdAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressBdAsync(binDat As ChilkatBinData) As ChilkatTask
Introduced in version 9.5.0.67

Creates an asynchronous task to call the UncompressBd method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressBdToFile
UncompressBdToFile(bd As ChilkatBinData, filePath As String) As Long
Introduced in version 11.0.0

Decompresses Gzip data stored in a BinData object and writes the result to a file.

Returns 1 for success, 0 for failure.

top
UncompressBdToFileAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressBdToFileAsync(bd As ChilkatBinData, filePath As String) As ChilkatTask
Introduced in version 11.0.0

Creates an asynchronous task to call the UncompressBdToFile method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressFile
UncompressFile(srcPath As String, destPath As String) As Long

Decompresses a Gzip file and writes the result to the specified output path.

The output filename is provided by the caller. The filename embedded in the Gzip data is not used.

Returns 1 for success, 0 for failure.

top
UncompressFileAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressFileAsync(srcPath As String, destPath As String) As ChilkatTask

Creates an asynchronous task to call the UncompressFile method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressFileToMem
UncompressFileToMem(srcPath As String) As Variant

Decompresses a Gzip file and returns the uncompressed data as a byte array.

The uncompressed output is held in memory and must not exceed 4 GB.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

top
UncompressFileToMemAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressFileToMemAsync(srcPath As String) As ChilkatTask

Creates an asynchronous task to call the UncompressFileToMem method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressFileToString
UncompressFileToString(srcPath As String, charset As String) As String

Decompresses a Gzip file that contains text and returns the uncompressed text as a string.

The charset parameter specifies the character encoding of the uncompressed text, such as utf-8, iso-8859-1, windows-1252, shift_JIS, big5, etc.

Returns Nothing on failure

More Information and Examples
top
UncompressFileToStringAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressFileToStringAsync(srcPath As String, charset As String) As ChilkatTask

Creates an asynchronous task to call the UncompressFileToString method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressMemory
UncompressMemory(inData As Variant) As Variant

Decompresses an in-memory Gzip image and returns the uncompressed data as a byte array.

The uncompressed output is held in memory and must not exceed 4 GB.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

top
UncompressMemoryAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressMemoryAsync(inData As Variant) As ChilkatTask

Creates an asynchronous task to call the UncompressMemory method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressMemToFile
UncompressMemToFile(inData As Variant, destPath As String) As Long

Decompresses an in-memory Gzip image and writes the uncompressed data to a file.

Returns 1 for success, 0 for failure.

top
UncompressMemToFileAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressMemToFileAsync(inData As Variant, destPath As String) As ChilkatTask

Creates an asynchronous task to call the UncompressMemToFile method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressString
UncompressString(inData As Variant, inCharset As String) As String

Decompresses Gzip-compressed data and returns the result as a string.

After decompression, the result is raw binary data (a sequence of bytes). These bytes are then interpreted as text using the specified character set (such as utf-8, iso-8859-1, etc.) to produce the final string.

Internally, Chilkat converts the byte sequence to a string by interpreting the bytes according to the specified character set. For example, if utf-8 is specified, the bytes are treated as the UTF-8 byte representation of text and decoded into the internal string format used by the programming language.

It is important that the character set matches the one originally used when the data was compressed. If the wrong character set is used, the byte-to-text conversion may produce incorrect or unreadable characters.

Returns Nothing on failure

More Information and Examples
top
UncompressStringAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UncompressStringAsync(inData As Variant, inCharset As String) As ChilkatTask

Creates an asynchronous task to call the UncompressString method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
UncompressStringENC
UncompressStringENC(inStr As String, charset As String, encoding As String) As String

Decompresses Gzip data provided as an encoded string and returns the uncompressed result as text.

The input string is first decoded using the specified encoding, such as base64, hex, url, base32, quoted-printable, etc. The decoded Gzip data is then decompressed and converted to text using the specified character set.

Returns Nothing on failure

More Information and Examples
top
UnTarGz
UnTarGz(gzPath As String, destDir As String, ByVal bNoAbsolute As Long) As Long

Extracts a .tar.gz archive to a directory.

The Gzip decompression and TAR extraction are performed in streaming mode. No temporary files are created, and memory usage remains small and constant.

If bNoAbsolute is 1, absolute paths in the TAR archive are not allowed. This helps protect against extracting files to unsafe locations, such as system directories.

Returns 1 for success, 0 for failure.

top
UnTarGzAsync (1) (2) (AutoIt) (PowerBuilder) (VBScript) (Visual Basic 6.0) (Visual FoxPro)
UnTarGzAsync(gzPath As String, destDir As String, ByVal bNoAbsolute As Long) As ChilkatTask

Creates an asynchronous task to call the UnTarGz method with the arguments provided.

Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.

Returns Nothing on failure

top
XfdlToXml
XfdlToXml(xfldData As String) As String

Converts base64-encoded, Gzip-compressed XFDL data to XML text.

The input contains base64 data. The method decodes it, decompresses the Gzip data, and returns the resulting XML string.

XFDL (Extensible Forms Description Language) is an XML-based format used to define secure, interactive electronic forms—often including digital signatures and integrity protections—commonly used in government and enterprise applications.

Returns Nothing on failure

top

Events

AbortCheck
AbortCheck(abort As Long)

Enables a method call to be aborted by triggering the AbortCheck event at intervals defined by the HeartbeatMs property. If HeartbeatMs is set to its default value of 0, no events will occur. For instance, set HeartbeatMs to 200 to trigger 5 AbortCheck events per second.

More Information and Examples

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Event Callbacks

Dim WithEvents myGzip As ChilkatGzip

Private Sub myGzip_AbortCheck(abort As Long)

	'Insert application code here.

End Sub
top
PercentDone
PercentDone(ByVal pctDone As Long, abort As Long)

This provides the percentage completion for any method involving network communications or time-consuming processing, assuming the progress can be measured as a percentage. This event is triggered only when it's possible and logical to express the operation's progress as a percentage. The pctDone argument will range from 1 to 100. For methods that finish quickly, the number of PercentDone callbacks may vary, but the final callback will have pctDone equal to 100. For longer operations, callbacks will not exceed one per percentage point (e.g., 1, 2, 3, ..., 98, 99, 100).

The PercentDone callback also acts as an AbortCheck event. For fast methods where PercentDone fires, an AbortCheck event may not trigger since the PercentDone callback already provides an opportunity to abort. For longer operations, where time between PercentDone callbacks is extended, AbortCheck callbacks enable more responsive operation termination.

To abort the operation, set the abort output argument to 1. This will cause the method to terminate and return a failure status or corresponding failure value.

More Information and Examples

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Event Callbacks

Dim WithEvents myGzip As ChilkatGzip

Private Sub myGzip_PercentDone(ByVal pctDone As Long, abort As Long)

	'Insert application code here.

End Sub
top
ProgressInfo
ProgressInfo(ByVal name As String, ByVal value As String)

This event callback provides tag name/value pairs that detail what occurs during a method call. To discover existing tag names, create code to handle the event, emit the pairs, and review them. Most tag names are self-explanatory.

More Information and Examples

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Event Callbacks

Dim WithEvents myGzip As ChilkatGzip

Private Sub myGzip_ProgressInfo(ByVal name As String, ByVal value As String)

	'Insert application code here.

End Sub
top
TaskCompleted
TaskCompleted(task As ChilkatTask)

Called from the background thread when an asynchronous task completes.

VB6 Event callback implementation:

Important: Event callbacks from asynchronous method calls are generally not possible from the ActiveX. See VB6 Event Callbacks

Dim WithEvents myGzip As ChilkatGzip

Private Sub myGzip_TaskCompleted(task As ChilkatTask)

	'Insert application code here.

End Sub
top

Deprecated

Decode
Decode(encodedStr As String, encoding As String) As Variant
This method is deprecated.

Decodes an encoded string and returns the original data. The encoding mode is determined by encoding. It may be base64, hex, quoted-printable, or url.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

top
DeflateStringENC
DeflateStringENC(inString As String, charsetName As String, outputEncoding As String) As String
This method is deprecated.

Compresses a string using the raw deflate algorithm and returns the compressed data as an encoded string.

The input string is first converted to bytes using the specified character set. The compressed binary data is then encoded using the requested output encoding, such as hex, base64, url, or quoted-printable.

Important: This method produces raw deflate-compressed data, not Gzip-format data. Use the Compress* methods when Gzip format output is required.

Returns Nothing on failure

More Information and Examples
top
Encode
Encode(byteData As Variant, encoding As String) As String
This method is deprecated.

Encodes binary data to a printable string. The encoding mode is determined by encoding. It may be base64, hex, quoted-printable, or url.

Returns Nothing on failure

top
GetDt
GetDt() As CkDateTime
This method is deprecated.

Applications should instead access the LastModStr property.

Gets the last-modification date/time to be embedded within the .gz.

Returns Nothing on failure

top
InflateStringENC
InflateStringENC(inString As String, convertFromCharset As String, inputEncoding As String) As String
This method is deprecated.

Decompresses data previously compressed with DeflateStringENC.

The input string is first decoded using the specified input encoding, such as hex, base64, url, or quoted-printable. The resulting compressed bytes are then inflated, and the final bytes are converted to a string using the specified character set.

Returns Nothing on failure

top
ReadFile
ReadFile(path As String) As Variant
This method is deprecated.

Reads a binary file into memory and returns the byte array. Note: This method does not parse a Gzip, it is only a convenience method for reading a binary file into memory.

Returns a zero-length byte array (as a Variant) on failure.
An empty array will have a UBound of -1 meaning 0 elements.

top
WriteFile
WriteFile(path As String, binaryData As Variant) As Long
This method is deprecated.

A convenience method for writing a binary byte array to a file.

Returns 1 for success, 0 for failure.

top