Package com.helger.base.codec.impl
Class LZWCodec.LZWDecodeDictionary
java.lang.Object
com.helger.base.codec.impl.LZWCodec.AbstractLZWDictionary
com.helger.base.codec.impl.LZWCodec.LZWDecodeDictionary
- Enclosing class:
LZWCodec
-
Field Summary
Fields inherited from class com.helger.base.codec.impl.LZWCodec.AbstractLZWDictionary
CODE_CLEARTABLE, CODE_EOF, m_aTab, m_nCodeBits, m_nFreeCode, MAX_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte @Nullable []directGetAllBytes(int nCode) Directly get all bytes for a given code without copying.intreadCode(@NonNull NonBlockingBitInputStream aBIS) Read the next codeMethods inherited from class com.helger.base.codec.impl.LZWCodec.AbstractLZWDictionary
addEntry, getNextFreeCode, reset
-
Constructor Details
-
LZWDecodeDictionary
public LZWDecodeDictionary()Constructor.
-
-
Method Details
-
readCode
Read the next code- Parameters:
aBIS- The stream to read from- Returns:
- The next code
- Throws:
IOException- In case EOF is reached
-
directGetAllBytes
@ReturnsMutableObject("speed") public byte @Nullable [] directGetAllBytes(@Nonnegative int nCode) Directly get all bytes for a given code without copying.- Parameters:
nCode- The code to look up. Must be ≥ 0.- Returns:
- The byte array for the given code, or
nullif the code is not in the dictionary.
-