Class LZWDecoder
A class for performing LZW decoding.
public class LZWDecoder
- Inheritance
-
LZWDecoder
- Inherited Members
Constructors
LZWDecoder()
Creates an LZWDecoder instance.
public LZWDecoder()
Methods
AddStringToTable(byte[])
Add a new string to the string table.
public virtual void AddStringToTable(byte[] @string)
Parameters
string
byte[]byte[] to store in the string table
AddStringToTable(byte[], byte)
Add a new string to the string table.
public virtual void AddStringToTable(byte[] oldString, byte newString)
Parameters
ComposeString(byte[], byte)
Append newString
to the end of oldString
.
public virtual byte[] ComposeString(byte[] oldString, byte newString)
Parameters
Returns
- byte[]
combined string
Decode(byte[], Stream)
Method to decode LZW compressed data.
public virtual void Decode(byte[] data, Stream uncompData)
Parameters
GetNextCode()
Attempt to get the next code.
public virtual int GetNextCode()
Returns
- int
next code
Remarks
Attempt to get the next code. Exceptions are caught to make this robust to cases wherein the EndOfInformation code has been omitted from a strip. Examples of such cases have been observed in practice.
InitializeStringTable()
Initialize the string table.
public virtual void InitializeStringTable()
WriteString(byte[])
Write out the string just uncompressed.
public virtual void WriteString(byte[] @string)
Parameters
string
byte[]content to write to the uncompressed data