Chilkat VB.NET Bz2 Class Reference

Bz2

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

Object Creation

(C#)
Chilkat.Bz2 obj = new Chilkat.Bz2();
(VB.NET)
Dim obj As New Chilkat.Bz2()

Properties

EnableEvents As Boolean

To be documented soon...

LastErrorHtml As String (ReadOnly)

Error information in HTML format for the last method called.

LastErrorText As String (ReadOnly)

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

LastErrorXml As String (ReadOnly)

Error information in XML format for the last method called.

Methods

Function CompressFile(ByVal inFilename As String, ByVal outBz2Filename As String) As Boolean

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

Returns true for success, false for failure.

Function CompressFileToMem(ByVal inFilename As String) As Byte()

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

Returns a NULL object reference on failure.

Returns an empty byte array on failure

Function CompressMemToFile(ByVal inData As Byte(), ByVal outFilename As String) As Boolean

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

Returns true for success, false for failure.

Function CompressMemory(ByVal inData As Byte()) As Byte()

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

Returns an empty byte array on failure

Function SaveLastError(ByVal filename As String) As Boolean

Saves the last error information to an XML formatted file.

Function UncompressFile(ByVal inFilename As String, ByVal outFilename As String) As Boolean

Unzips a .bz2 file.

Returns true for success, false for failure.

Function UncompressFileToMem(ByVal inFilename As String) As Byte()

Unzips a .bz2 file directly to memory.

Returns a NULL object reference on failure.

Returns an empty byte array on failure

Function UncompressMemToFile(ByVal inData As Byte(), ByVal outFilename As String) As Boolean

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

Returns true for success, false for failure.

Function UncompressMemory(ByVal inData As Byte()) As Byte()

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

Returns a NULL object reference on failure.

Returns an empty byte array on failure

Function UnlockComponent(ByVal regCode As String) As Boolean

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