TChilkatBz2 Delphi Reference
TChilkatBz2
Provides the ability to create and unzip .bz2 compressed files using the BZip2 compression algorithm.
Object Creation
var
obj: TChilkatBz2;
...
begin
obj := TChilkatBz2.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.
Methods
function CompressFile(inFilename: WideString, outBz2Filename: WideString): Integer;
Compresses a file to create a BZip2 compressed file (.bz2). Returns 1 for success, 0 for failure.
function CompressFileToMem(inFilename: WideString): OleVariant;
BZip2 compresses a file to an in-memory image of a .bz2 file. 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;
BZip2 compresses and creates a .bz2 file from in-memory data. Returns 1 for success, 0 for failure.
function CompressMemory(inData: OleVariant): OleVariant;
Compresses in-memory data to an in-memory image of a .bz2 file. Returns a zero-length byte array (as an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function SaveLastError(logFilename: WideString): Integer;
Saves the last error information to an XML formatted file.
function UncompressFile(inFilename: WideString, outFilename: WideString): Integer;
Unzips a .bz2 file. Returns 1 for success, 0 for failure.
function UncompressFileToMem(inFilename: WideString): OleVariant;
Unzips a .bz2 file directly to memory. Returns a zero-length byte array (as an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function UncompressMemToFile(inData: OleVariant, outFilename: WideString): Integer;
Unzips from an in-memory image of a .bz2 file to a file. Returns 1 for success, 0 for failure.
function UncompressMemory(inData: OleVariant): OleVariant;
Unzips from an in-memory image of a .bz2 file directly into memory. Returns a zero-length byte array (as an OleVariant) on failure. An empty array will have a VarArrayHighBound of -1 meaning 0 elements.
function UnlockComponent(regCode: WideString): Integer;
Unlocks the component allowing for the full functionality to be used. If a permanent (purchased) unlock code is passed, there is no expiration. Any other string automatically begins a fully-functional 30-day trial the first time UnlockComponent is called. Returns 1 for success, 0 for failure. Diagnosing UnlockComponent Problems UnlockComponent LastErrorText shows exact string passed to it. Verify UnlockComponent Success w/ Permanent Unlock Code LastErrorText Standard Information How UnlockComponent Works
|