Class LZWCompressor


  • public class LZWCompressor
    extends Object
    • Constructor Detail

      • LZWCompressor

        public LZWCompressor​(ImageOutputStream out,
                             int codeSize,
                             boolean TIFF)
                      throws IOException
        Parameters:
        out - destination for compressed data
        codeSize - the initial code size for the LZW compressor
        TIFF - flag indicating that TIFF lzw fudge needs to be applied
        Throws:
        IOException - if underlying output stream error
    • Method Detail

      • compress

        public void compress​(byte[] buf,
                             int offset,
                             int length)
                      throws IOException
        Parameters:
        buf - data to be compressed to output stream
        Throws:
        IOException - if underlying output stream error