| Modifier and Type | Field and Description |
|---|---|
| pack-priv BitFile | bf
output destination for bit codes |
| pack-priv int | clearCode
reserved clear code based on code size |
| pack-priv int | codeSize
base underlying code size of data being compressed 8 for TIFF, 1 to 8 for GIF |
| pack-priv int | endOfInfo
reserved end of data code based on code size |
| pack-priv int | limit
limit at which current number of bits code size has to be increased |
| pack-priv LZWStringTable | lzss
general purpose LZW string table |
| pack-priv int | numBits
current number bits output for each code |
| pack-priv short | prefix
the prefix code which represents the predecessor string to current input point |
| pack-priv boolean | tiffFudge
modify the limits of the code values in LZW encoding due to TIFF bug / feature |
| Access | Constructor and Description |
|---|---|
| public | LZWCompressor(ImageOutputStream
destination for compressed data out, int the initial code size for the LZW compressor codeSize, boolean flag indicating that TIFF lzw fudge needs to be applied TIFF)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void |
| bf | back to summary |
|---|---|
| pack-priv BitFile bf output destination for bit codes | |
| clearCode | back to summary |
|---|---|
| pack-priv int clearCode reserved clear code based on code size | |
| codeSize | back to summary |
|---|---|
| pack-priv int codeSize base underlying code size of data being compressed 8 for TIFF, 1 to 8 for GIF | |
| endOfInfo | back to summary |
|---|---|
| pack-priv int endOfInfo reserved end of data code based on code size | |
| limit | back to summary |
|---|---|
| pack-priv int limit limit at which current number of bits code size has to be increased | |
| lzss | back to summary |
|---|---|
| pack-priv LZWStringTable lzss general purpose LZW string table | |
| numBits | back to summary |
|---|---|
| pack-priv int numBits current number bits output for each code | |
| prefix | back to summary |
|---|---|
| pack-priv short prefix the prefix code which represents the predecessor string to current input point | |
| tiffFudge | back to summary |
|---|---|
| pack-priv boolean tiffFudge modify the limits of the code values in LZW encoding due to TIFF bug / feature | |
| LZWCompressor | back to summary |
|---|---|
public LZWCompressor(ImageOutputStream out, int codeSize, boolean TIFF) throws IOException
| |
| compress | back to summary |
|---|---|
public void compress(byte[] buf, int offset, int length) throws IOException
| |
| dump | back to summary |
|---|---|
| public void dump(PrintStream out) | |
| flush | back to summary |
|---|---|
| public void flush() throws IOException | |