com.lowagie.text.pdf

Class LZWDecoder


public class LZWDecoder
extends java.lang.Object

A class for performing LZW decoding.

Field Summary

(package private) int[]
andTable
(package private) int
bitPointer
(package private) int
bitsToGet
(package private) int
bytePointer
(package private) byte[]
data
(package private) int
nextBits
(package private) int
nextData
(package private) byte[][]
stringTable
(package private) int
tableIndex
(package private) OutputStream
uncompData

Constructor Summary

LZWDecoder()

Method Summary

void
addStringToTable(oldString[] , byte newString)
Add a new string to the string table.
void
addStringToTable(string[] )
Add a new string to the string table.
byte[]
composeString(oldString[] , byte newString)
Append newString to the end of oldString.
void
decode(data[] , OutputStream uncompData)
Method to decode LZW compressed data.
int
getNextCode()
void
initializeStringTable()
Initialize the string table.
void
writeString(string[] )
Write out the string just uncompressed.

Field Details

andTable

(package private)  int[] andTable

bitPointer

(package private)  int bitPointer

bitsToGet

(package private)  int bitsToGet

bytePointer

(package private)  int bytePointer

data

(package private)  byte[] data

nextBits

(package private)  int nextBits

nextData

(package private)  int nextData

stringTable

(package private)  byte[][] stringTable

tableIndex

(package private)  int tableIndex

uncompData

(package private)  OutputStream uncompData

Constructor Details

LZWDecoder

public LZWDecoder()

Method Details

addStringToTable

public void addStringToTable(oldString[] ,
                             byte newString)
Add a new string to the string table.

addStringToTable

public void addStringToTable(string[] )
Add a new string to the string table.

composeString

public byte[] composeString(oldString[] ,
                            byte newString)
Append newString to the end of oldString.

decode

public void decode(data[] ,
                   OutputStream uncompData)
Method to decode LZW compressed data.
Parameters:
uncompData - Array to return the uncompressed data in.

getNextCode

public int getNextCode()

initializeStringTable

public void initializeStringTable()
Initialize the string table.

writeString

public void writeString(string[] )
Write out the string just uncompressed.