| java.lang.Object com.sun.media.imageioimpl.common.LZWCompressor
LZWCompressor | public class LZWCompressor (Code) | | Modified from original LZWCompressor to change interface to passing a
buffer of data to be compressed.
|
Method Summary | |
public void | compress(byte[] buf, int offset, int length) | public void | dump(PrintStream out) | public void | flush() Indicate to compressor that no more data to go so write out
any remaining buffered data. |
clearCode_ | int clearCode_(Code) | | reserved clear code based on code size *
|
codeSize_ | int codeSize_(Code) | | base underlying code size of data being compressed 8 for TIFF, 1 to 8 for GIF *
|
endOfInfo_ | int endOfInfo_(Code) | | reserved end of data code based on code size *
|
limit_ | int limit_(Code) | | limit at which current number of bits code size has to be increased *
|
numBits_ | int numBits_(Code) | | current number bits output for each code *
|
prefix_ | short prefix_(Code) | | the prefix code which represents the predecessor string to current input point *
|
tiffFudge_ | boolean tiffFudge_(Code) | | modify the limits of the code values in LZW encoding due to TIFF bug / feature *
|
LZWCompressor | public LZWCompressor(ImageOutputStream out, int codeSize, boolean TIFF) throws IOException(Code) | | Parameters: out - destination for compressed data Parameters: codeSize - the initial code size for the LZW compressor Parameters: TIFF - flag indicating that TIFF lzw fudge needs to be applied exception: IOException - if underlying output stream error |
compress | public void compress(byte[] buf, int offset, int length) throws IOException(Code) | | Parameters: buf - data to be compressed to output stream exception: IOException - if underlying output stream error |
flush | public void flush() throws IOException(Code) | | Indicate to compressor that no more data to go so write out
any remaining buffered data.
exception: IOException - if underlying output stream error |
|
|