CkBz2 Ruby Programming
Reference Documentation

CkBz2

Provides the ability to create and unzip .bz2 compressed files using the BZip2 compression algorithm.

Object Creation

obj = Chilkat::CkBz2.new()

Properties

# str is a CkString object (output)
LastErrorHtml( str )

Error information in HTML format for the last method called.

# str is a CkString object (output)
LastErrorText( str )

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

# str is a CkString object (output)
LastErrorXml( str )

Error information in XML format for the last method called.

# Returns a boolean value
get_Utf8( )

# b is a boolean (input)
put_Utf8( b )

To be documented soon...

Methods

# inFilename is a string (input)
# outBz2Filename is a string (input)
# Returns a boolean value
CompressFile( inFilename, outBz2Filename )

Compresses a file to create a BZip2 compressed file (.bz2).

Returns true for success, false for failure.

# inFilename is a string (input)
# outBytes is a CkByteData object (output)
# Returns a boolean value
CompressFileToMem( inFilename, outBytes )

BZip2 compresses a file to an in-memory image of a .bz2 file.

# inData is a CkByteData object (output)
# outFilename is a string (input)
# Returns a boolean value
CompressMemToFile( inData, outFilename )

BZip2 compresses and creates a .bz2 file from in-memory data.

Returns true for success, false for failure.

# inData is a CkByteData object (output)
# outBytes is a CkByteData object (output)
# Returns a boolean value
CompressMemory( inData, outBytes )

Compresses in-memory data to an in-memory image of a .bz2 file.

# filename is a string (input)
# Returns a boolean value
SaveLastError( filename )

Saves the last error information to an XML formatted file.

# inFilename is a string (input)
# outFilename is a string (input)
# Returns a boolean value
UncompressFile( inFilename, outFilename )

Unzips a .bz2 file.

Returns true for success, false for failure.

# inFilename is a string (input)
# outBytes is a CkByteData object (output)
# Returns a boolean value
UncompressFileToMem( inFilename, outBytes )

Unzips a .bz2 file directly to memory.

# inData is a CkByteData object (output)
# outFilename is a string (input)
# Returns a boolean value
UncompressMemToFile( inData, outFilename )

Unzips from an in-memory image of a .bz2 file to a file.

Returns true for success, false for failure.

# inData is a CkByteData object (output)
# outBytes is a CkByteData object (output)
# Returns a boolean value
UncompressMemory( inData, outBytes )

Unzips from an in-memory image of a .bz2 file directly into memory.

# regCode is a string (input)
# Returns a boolean value
UnlockComponent( regCode )

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 true for success, false 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

# Returns a string
lastErrorHtml( )

Error information in HTML format for the last method called.

Returns a null on failure

# Returns a string
lastErrorText( )

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

Returns a null on failure

# Returns a string
lastErrorXml( )

Error information in XML format for the last method called.

Returns a null on failure