Table of Contents

Class LZWDecoder

Namespace
iText.Kernel.Pdf.Filters
Assembly
itext.kernel.dll

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

oldString byte[]

stored string

newString byte

string to be appended to the stored string

ComposeString(byte[], byte)

Append newString to the end of oldString.

public virtual byte[] ComposeString(byte[] oldString, byte newString)

Parameters

oldString byte[]

string be appended to

newString byte

string that is to be appended to oldString

Returns

byte[]

combined string

Decode(byte[], Stream)

Method to decode LZW compressed data.

public virtual void Decode(byte[] data, Stream uncompData)

Parameters

data byte[]

The compressed data.

uncompData Stream

Array to return the uncompressed data in.

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