UnixCompress ActiveX Reference

UnixCompress

UNIX (.Z) compression component.

Object Creation

(Visual Basic 6.0)
Dim obj As New UnixCompress
(ASP)
set obj = Server.CreateObject("Chilkat.UnixCompress")
(VBScript)
set obj = CreateObject("Chilkat.UnixCompress")
(Delphi)
obj := TUnixCompress.Create(Self);
(FoxPro)
loObject = CreateObject('Chilkat.UnixCompress')
(SQL Server)
EXEC @hr = sp_OACreate 'Chilkat.UnixCompress', @obj OUT
(Javascript)
var obj = new ActiveXObject("Chilkat.UnixCompress");

Properties

LastErrorHtml As String (read-only)

Error information in HTML format for the last method called.

LastErrorText As String (read-only)

Error information in plain-text format for the last method called.

LastErrorXml As String (read-only)

Error information in XML format for the last method called.

Version As String (read-only)

To be documented soon...

Methods

CompressFile(inFilename As String, outFilename As String) As Long

Compresses a file to create a UNIX compressed file (.Z). This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.

Returns 1 for success, 0 for failure.

CompressFileToMem(inFilename As String) As Variant

Unix compresses a file to an in-memory image of a .Z file. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

Returns an empty Variant on failure.

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

CompressMemToFile(inData As Variant, outFilename As String) As Long

Unix compresses and creates a .Z file from in-memory data. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

Returns 1 for success, 0 for failure.

CompressMemory(inData As Variant) As Variant

Compresses in-memory data to an in-memory image of a .Z file. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

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

CompressString(inStr As String, outCharset As String) As Variant

To be documented soon...

CompressStringToFile(inStr As String, outCharset As String, outFilename As String) As Long

To be documented soon...

IsUnlocked() As Long

Returns true if the component has been unlocked. (For ActiveX, returns 1 if unlocked.)

ReadFile(filename As String) As Variant

To be documented soon...

SaveLastError(filename As String)

Saves the last error information to an XML formatted file.

UnTarZ(zFilename As String, destDir As String, noAbsolute As Long) As Long

Unpacks a .tar.Z file. The decompress and untar occur in streaming mode. There are no temporary files and the memory footprint is constant (and small) while untarring.

Returns 1 for success, 0 for failure.

UncompressFile(inFilename As String, outFilename As String) As Long

Uncompresses a .Z file. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

Returns 1 for success, 0 for failure.

UncompressFileToMem(inFilename As String) As Variant

Uncompresses a .Z file directly to memory. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

Returns an empty Variant on failure.

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

UncompressFileToString(zFilename As String, charset As String) As String

Uncompresses a .Z file that contains a text file. The contents of the text file are returned as a string. The character encoding of the text file is specified by charset. Typical charsets are "iso-8859-1", "utf-8", "windows-1252", "shift_JIS", "big5", etc.

Returns a null on failure

List of Valid Charsets

UncompressMemToFile(inData As Variant, outFilename As String) As Long

Uncompresses from an in-memory image of a .Z file to a file. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

Returns 1 for success, 0 for failure.

UncompressMemory(inData As Variant) As Variant

Uncompresses from an in-memory image of a .Z file directly into memory. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.)

Returns an empty Variant on failure.

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

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

To be documented soon...

UnlockComponent(b1 As String) As Long

Unlocks the component allowing for the full functionality to be used.

Returns 1 for success, 0 for failure.

WriteFile(filename As String, binaryData As Variant) As Long

To be documented soon...