Chilkat C# UnixCompress Class Reference

UnixCompress

UNIX (.Z) compression component.

Properties

public bool EnableEvents {get; set; }

To be documented soon...

public string LastErrorHtml {get; }

Error information in HTML format for the last method called.

public string LastErrorText {get; }

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

public string LastErrorXml {get; }

Error information in XML format for the last method called.

Methods

public bool CompressFile(string inFilename, string outFilename);

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

Returns true for success, false for failure.

public byte[] CompressFileToMem(string inFilename);

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 NULL object reference on failure.

Returns null on failure

public bool CompressMemToFile(byte[] inData, string outFilename);

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

Returns true for success, false for failure.

public byte[] CompressMemory(byte[] inData);

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

Returns null on failure

public bool IsUnlocked();

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

public bool SaveLastError(string filename);

Saves the last error information to an XML formatted file.

public bool UnTarZ(string zFilename, string destDir, bool bNoAbsolute);

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

public bool UncompressFile(string inFilename, string outFilename);

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

Returns true for success, false for failure.

public byte[] UncompressFileToMem(string inFilename);

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

Returns a NULL object reference on failure.

Returns null on failure

public bool UncompressMemToFile(byte[] inData, string outFilename);

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

Returns true for success, false for failure.

public byte[] UncompressMemory(byte[] inData);

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 NULL object reference on failure.

Returns null on failure

public bool UnlockComponent(string unlockCode);

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

Returns true for success, false for failure.