public class ZCompressorInputStream extends LZWInputStream
DEFAULT_CODE_SIZE, in, UNUSED_PREFIX
Constructor and Description |
---|
ZCompressorInputStream(java.io.InputStream inputStream) |
ZCompressorInputStream(java.io.InputStream inputStream,
int memoryLimitInKb) |
Modifier and Type | Method and Description |
---|---|
protected int |
addEntry(int previousCode,
byte character)
Add a new entry to the dictionary.
|
protected int |
decompressNextSymbol()
Read the next code and expand it.
|
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a Unix compress file.
|
protected int |
readNextCode()
Reads the next code from the stream.
|
addEntry, addRepeatOfPreviousCode, close, expandCodeToOutputStack, getClearCode, getCodeSize, getCompressedCount, getPrefix, getPrefixesLength, getTableSize, incrementCodeSize, initializeTables, initializeTables, read, read, resetCodeSize, resetPreviousCode, setClearCode, setCodeSize, setPrefix, setTableSize
count, count, getBytesRead, getCount, getUncompressedCount, pushedBackBytes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUncompressedCount
public ZCompressorInputStream(java.io.InputStream inputStream, int memoryLimitInKb) throws java.io.IOException
java.io.IOException
public ZCompressorInputStream(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
protected int readNextCode() throws java.io.IOException
This method is only protected for technical reasons and is not part of Commons Compress' published API. It may change or disappear without warning.
readNextCode
in class LZWInputStream
java.io.IOException
- on errorprotected int addEntry(int previousCode, byte character) throws java.io.IOException
This method is only protected for technical reasons and is not part of Commons Compress' published API. It may change or disappear without warning.
addEntry
in class LZWInputStream
previousCode
- the previous codecharacter
- the next character to appendjava.io.IOException
- on errorprotected int decompressNextSymbol() throws java.io.IOException
This method is only protected for technical reasons and is not part of Commons Compress' published API. It may change or disappear without warning.
decompressNextSymbol
in class LZWInputStream
java.io.IOException
- on errorpublic static boolean matches(byte[] signature, int length)
signature
- the bytes to checklength
- the number of bytes to check