public class LZWHashEncoder extends java.lang.Object implements ImageEncoder
| Constructor and Description |
|---|
LZWHashEncoder(java.io.OutputStream os,
int codesize,
int buf_length) |
LZWHashEncoder(java.io.OutputStream os,
int codesize,
int buf_length,
Updatable<java.lang.Integer> writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(byte[] pixels,
int start,
int len)
The actual encoding implementation
|
void |
finish()
Finish up the compression.
|
int |
getCompressedDataLen() |
void |
initialize() |
public LZWHashEncoder(java.io.OutputStream os,
int codesize,
int buf_length)
public LZWHashEncoder(java.io.OutputStream os,
int codesize,
int buf_length,
Updatable<java.lang.Integer> writer)
public void initialize()
throws java.lang.Exception
initialize in interface ImageEncoderjava.lang.Exceptionpublic void encode(byte[] pixels,
int start,
int len)
throws java.lang.Exception
ImageEncoderencode in interface ImageEncoderlen - the number of bytes to be encodedpixels - array of pixels (This has nothing to do with the actual bits per pixel since it could be pixel packed)start - offset in the pixel array where the encoding starts (the actual position could be anywhere inside the
offset byte which maybe kept track of by the implementation class through a parameter such as
currPos if the encoder is pixel oriented).java.lang.Exceptionpublic void finish()
throws java.lang.Exception
finish in interface ImageEncoderjava.lang.Exceptionpublic int getCompressedDataLen()
getCompressedDataLen in interface ImageEncoder