com.itextpdf.text.pdf.codec
Class LZWCompressor
java.lang.Object
com.itextpdf.text.pdf.codec.LZWCompressor
public class LZWCompressor
- extends java.lang.Object
Modified from original LZWCompressor to change interface to passing a
buffer of data to be compressed.
- Since:
- 5.0.2
Constructor Summary |
LZWCompressor(java.io.OutputStream out,
int codeSize,
boolean TIFF)
|
Method Summary |
void |
compress(byte[] buf,
int offset,
int length)
|
void |
flush()
Indicate to compressor that no more data to go so write out
any remaining buffered data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LZWCompressor
public LZWCompressor(java.io.OutputStream out,
int codeSize,
boolean TIFF)
throws java.io.IOException
- Parameters:
out
- destination for compressed datacodeSize
- the initial code size for the LZW compressorTIFF
- flag indicating that TIFF lzw fudge needs to be applied
- Throws:
java.io.IOException
- if underlying output stream error
compress
public void compress(byte[] buf,
int offset,
int length)
throws java.io.IOException
- Parameters:
buf
- data to be compressed to output stream
- Throws:
java.io.IOException
- if underlying output stream error
flush
public void flush()
throws java.io.IOException
- Indicate to compressor that no more data to go so write out
any remaining buffered data.
- Throws:
java.io.IOException
- if underlying output stream error
Copyright © 2013. All Rights Reserved.