TUnixCompress Delphi Reference
TUnixCompress
UNIX (.Z) compression component.
Object Creation
var
obj: TUnixCompress;
...
begin
obj := TUnixCompress.Create(Self);
...
// When finished, free the object instance.
obj.Free();
Properties
property LastErrorHtml: WideString readonly
Error information in HTML format for the last method called.
property LastErrorText: WideString readonly
Error information in plain-text format for the last method called.
property LastErrorXml: WideString readonly
Error information in XML format for the last method called.
property Version: WideString readonly
To be documented soon...
Methods
function CompressFile(inFilename: WideString, outFilename: WideString): Integer;
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.
function CompressFileToMem(inFilename: WideString): OleVariant;
Unix compresses a file 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 an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function CompressMemToFile(inData: OleVariant, outFilename: WideString): Integer;
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.
function CompressMemory(inData: OleVariant): OleVariant;
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 an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function CompressString(inStr: WideString, outCharset: WideString): OleVariant;
To be documented soon...
function CompressStringToFile(inStr: WideString, outCharset: WideString, outFilename: WideString): Integer;
To be documented soon...
function IsUnlocked(): Integer;
Returns true if the component has been unlocked. (For ActiveX, returns 1 if unlocked.)
function ReadFile(filename: WideString): OleVariant;
To be documented soon...
procedure SaveLastError(filename: WideString);
Saves the last error information to an XML formatted file.
function UnTarZ(zFilename: WideString, destDir: WideString, noAbsolute: Integer): Integer;
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.
function UncompressFile(inFilename: WideString, outFilename: WideString): Integer;
Uncompresses a .Z file. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.) Returns 1 for success, 0 for failure.
function UncompressFileToMem(inFilename: WideString): OleVariant;
Uncompresses a .Z file directly to memory. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.) Returns a zero-length byte array (as an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function UncompressFileToString(zFilename: WideString, charset: WideString): WideString;
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 zero-length WideString on failure List of Valid Charsets
function UncompressMemToFile(inData: OleVariant, outFilename: WideString): Integer;
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.
function UncompressMemory(inData: OleVariant): OleVariant;
Uncompresses from an in-memory image of a .Z file directly into memory. (This compression uses the LZW (Lempel-Ziv-Welch) compression algorithm.) Returns a zero-length byte array (as an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function UncompressString(inData: OleVariant, inCharset: WideString): WideString;
To be documented soon...
function UnlockComponent(b1: WideString): Integer;
Unlocks the component allowing for the full functionality to be used. Returns 1 for success, 0 for failure.
function WriteFile(filename: WideString, binaryData: OleVariant): Integer;
To be documented soon...
|