|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.util.LZWDecompresser
public abstract class LZWDecompresser
This class provides common functionality for the various LZW implementations in the different file formats. It's currently used by HDGF and HMEF. Two good resources on LZW are: http://en.wikipedia.org/wiki/LZW http://marknelson.us/1989/10/01/lzw-data-compression/
Constructor Summary | |
---|---|
protected |
LZWDecompresser(boolean maskMeansCompressed,
int codeLengthIncrease,
boolean positionIsBigEndian)
|
Method Summary | |
---|---|
protected abstract int |
adjustDictionaryOffset(int offset)
Adjusts the position offset if needed when looking something up in the dictionary. |
byte[] |
decompress(java.io.InputStream src)
Decompresses the given input stream, returning the array of bytes of the decompressed input. |
void |
decompress(java.io.InputStream src,
java.io.OutputStream res)
Perform a streaming decompression of the input. |
static int |
fromByte(byte b)
Given a java byte, turn it into an integer between 0 and 255 (i.e. |
static byte |
fromInt(int b)
Given an integer, turn it into a java byte, handling the wrapping. |
protected abstract int |
populateDictionary(byte[] dict)
Populates the dictionary, and returns where in it to begin writing new codes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LZWDecompresser(boolean maskMeansCompressed, int codeLengthIncrease, boolean positionIsBigEndian)
Method Detail |
---|
protected abstract int populateDictionary(byte[] dict)
protected abstract int adjustDictionaryOffset(int offset)
public byte[] decompress(java.io.InputStream src) throws java.io.IOException
java.io.IOException
public void decompress(java.io.InputStream src, java.io.OutputStream res) throws java.io.IOException
java.io.IOException
public static byte fromInt(int b)
public static int fromByte(byte b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |