Class LZWCodec
java.lang.Object
org.eclipse.swt.internal.image.LZWCodec
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) int(package private) byte[](package private) int(package private) int(package private) int(package private) int(package private) int(package private) int(package private) int(package private) int(package private) ImageData(package private) int(package private) int(package private) int(package private) int(package private) LEDataInputStream(package private) boolean(package private) int(package private) byte[](package private) ImageLoader(package private) static final int[](package private) int(package private) LZWNode[](package private) LEDataOutputStream(package private) int(package private) int[](package private) int[](package private) int[](package private) int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidcopyRow(byte[] buf, int copies) Copy duplicate rows of pixel values to the image.(package private) voiddecode()Decode the input.voiddecode(LEDataInputStream inputStream, ImageLoader loader, ImageData image, boolean interlaced, int depth) Decode the LZW-encoded bytes in the given byte stream into the given DeviceIndependentImage.(package private) voidencode()Encode the image.voidencode(LEDataOutputStream byteStream, ImageData image) Encode the bytes into the given byte stream from the given DeviceIndependentImage.(package private) intEncoding loop broken out to allow early return.(package private) voidInitialize the receiver for decoding the given byte array.(package private) voidInitialize the receiver for encoding the given byte array.(package private) intnextCode()Answer the next code from the input byte array.(package private) intAnswer the next pixel to encode in the image(package private) voidnextPixels(byte[] buf, int lineWidth) Copy a row of pixel values from the image.(package private) voidnextPutCode(int aCode) Output aCode to the output stream.(package private) voidnextPutPixels(byte[] buf) Copy a row of pixel values to the image.(package private) intRead a block from the byte stream.(package private) voidWrite a block to the byte stream.
-
Field Details
-
bitsPerPixel
int bitsPerPixel -
blockSize
int blockSize -
blockIndex
int blockIndex -
currentByte
int currentByte -
bitsLeft
int bitsLeft -
codeSize
int codeSize -
clearCode
int clearCode -
endCode
int endCode -
newCodes
int newCodes -
topSlot
int topSlot -
currentSlot
int currentSlot -
imageWidth
int imageWidth -
imageHeight
int imageHeight -
imageX
int imageX -
imageY
int imageY -
pass
int pass -
line
int line -
codeMask
int codeMask -
block
byte[] block -
lineArray
byte[] lineArray -
stack
int[] stack -
suffix
int[] suffix -
prefix
int[] prefix -
nodeStack
LZWNode[] nodeStack -
inputStream
LEDataInputStream inputStream -
outputStream
LEDataOutputStream outputStream -
image
ImageData image -
loader
ImageLoader loader -
interlaced
boolean interlaced -
MASK_TABLE
static final int[] MASK_TABLE
-
-
Constructor Details
-
LZWCodec
LZWCodec()
-
-
Method Details
-
decode
void decode()Decode the input. -
decode
public void decode(LEDataInputStream inputStream, ImageLoader loader, ImageData image, boolean interlaced, int depth) Decode the LZW-encoded bytes in the given byte stream into the given DeviceIndependentImage. -
encode
void encode()Encode the image. -
encode
Encode the bytes into the given byte stream from the given DeviceIndependentImage. -
encodeLoop
int encodeLoop()Encoding loop broken out to allow early return. -
initializeForDecoding
void initializeForDecoding()Initialize the receiver for decoding the given byte array. -
initializeForEncoding
void initializeForEncoding()Initialize the receiver for encoding the given byte array. -
nextCode
int nextCode()Answer the next code from the input byte array. -
nextPixel
int nextPixel()Answer the next pixel to encode in the image -
nextPixels
void nextPixels(byte[] buf, int lineWidth) Copy a row of pixel values from the image. -
nextPutCode
void nextPutCode(int aCode) Output aCode to the output stream. -
nextPutPixels
void nextPutPixels(byte[] buf) Copy a row of pixel values to the image. -
copyRow
void copyRow(byte[] buf, int copies) Copy duplicate rows of pixel values to the image. This is to fill in rows if the image is interlaced. -
readBlock
int readBlock()Read a block from the byte stream. Return the number of bytes read. Throw an exception if the block could not be read. -
writeBlock
void writeBlock()Write a block to the byte stream. Throw an exception if the block could not be written.
-