public class ZCompressorInputStream extends LZWInputStream
DEFAULT_CODE_SIZE, in, UNUSED_PREFIX| Constructor and Description |
|---|
ZCompressorInputStream(java.io.InputStream inputStream) |
| 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, getPrefix, getPrefixesLength, getTableSize, incrementCodeSize, initializeTables, read, read, resetCodeSize, resetPreviousCode, setClearCode, setCodeSize, setPrefix, setTableSizecount, count, getBytesRead, getCount, pushedBackBytespublic ZCompressorInputStream(java.io.InputStream inputStream)
throws java.io.IOException
java.io.IOExceptionprotected 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 LZWInputStreamjava.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 LZWInputStreampreviousCode - 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 LZWInputStreamjava.io.IOException - on errorpublic static boolean matches(byte[] signature,
int length)
signature - the bytes to checklength - the number of bytes to check