Package icyllis.arc3d.core.image
Class LZWDecoder
java.lang.Object
icyllis.arc3d.core.image.LZWDecoder
The GIF format uses LSB first. The initial code size can vary between 2 and 8 bits, inclusive.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LZWDecoder
Returns thread local instance.int
Decode next string of data, which can be accessed bysetData(ByteBuffer, int)
method.byte[]
setData
(ByteBuffer data, int initCodeSize) Reset the decoder with the given input data buffer.
-
Constructor Details
-
LZWDecoder
public LZWDecoder()
-
-
Method Details
-
getInstance
Returns thread local instance. -
setData
Reset the decoder with the given input data buffer.- Parameters:
data
- the compressed data- Returns:
- the string table
-
readString
public int readString()Decode next string of data, which can be accessed bysetData(ByteBuffer, int)
method.- Returns:
- the length of string, or -1 on EOF
-