public abstract class LZWDecompresser extends Object
Modifier | Constructor and Description |
---|---|
protected |
LZWDecompresser(boolean maskMeansCompressed,
int codeLengthIncrease,
boolean positionIsBigEndian) |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
adjustDictionaryOffset(int offset)
Adjusts the position offset if needed when looking
something up in the dictionary.
|
byte[] |
decompress(InputStream src)
Decompresses the given input stream, returning the array of bytes
of the decompressed input.
|
void |
decompress(InputStream src,
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.
|
protected LZWDecompresser(boolean maskMeansCompressed, int codeLengthIncrease, boolean positionIsBigEndian)
protected abstract int populateDictionary(byte[] dict)
protected abstract int adjustDictionaryOffset(int offset)
public byte[] decompress(InputStream src) throws IOException
IOException
public void decompress(InputStream src, OutputStream res) throws IOException
IOException
public static byte fromInt(int b)
public static int fromByte(byte b)
Copyright © 2020. All rights reserved.