Class HpackHuffmanDecoder
java.lang.Object
io.netty.handler.codec.http2.HpackHuffmanDecoder
- All Implemented Interfaces:
ByteProcessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface ByteProcessor
ByteProcessor.IndexNotOfProcessor, ByteProcessor.IndexOfProcessor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Http2Exceptionprivate byte[]private static final byteprivate static final intprivate static final byteprivate static final intprivate static final byteprivate static final intprivate static final int[]A table of byte tuples (state, flags, output).private intprivate intFields inherited from interface ByteProcessor
FIND_ASCII_SPACE, FIND_COMMA, FIND_CR, FIND_CRLF, FIND_LF, FIND_LINEAR_WHITESPACE, FIND_NON_CR, FIND_NON_CRLF, FIND_NON_LF, FIND_NON_LINEAR_WHITESPACE, FIND_NON_NUL, FIND_NUL, FIND_SEMI_COLON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecompresses the given Huffman coded string literal.booleanprocess(byte input) This should never be called from anything but this class itself!private booleanprocessNibble(int input) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
HUFFMAN_COMPLETE
private static final byte HUFFMAN_COMPLETE- See Also:
-
HUFFMAN_EMIT_SYMBOL
private static final byte HUFFMAN_EMIT_SYMBOL- See Also:
-
HUFFMAN_FAIL
private static final byte HUFFMAN_FAIL- See Also:
-
HUFFMAN_COMPLETE_SHIFT
private static final int HUFFMAN_COMPLETE_SHIFT- See Also:
-
HUFFMAN_EMIT_SYMBOL_SHIFT
private static final int HUFFMAN_EMIT_SYMBOL_SHIFT- See Also:
-
HUFFMAN_FAIL_SHIFT
private static final int HUFFMAN_FAIL_SHIFT- See Also:
-
HUFFS
private static final int[] HUFFSA table of byte tuples (state, flags, output). They are packed together as:stateinvalid input: '<'invalid input: '<'16 + flagsinvalid input: '<'invalid input: '<'8 + output
-
BAD_ENCODING
-
dest
private byte[] dest -
k
private int k -
state
private int state
-
-
Constructor Details
-
HpackHuffmanDecoder
HpackHuffmanDecoder()
-
-
Method Details
-
decode
Decompresses the given Huffman coded string literal.- Parameters:
buf- the string literal to be decoded- Returns:
- the output stream for the compressed data
- Throws:
Http2Exception- EOS Decoded
-
process
public boolean process(byte input) This should never be called from anything but this class itself!- Specified by:
processin interfaceByteProcessor- Returns:
trueif the processor wants to continue the loop and handle the next byte in the buffer.falseif the processor wants to stop handling bytes and abort the loop.
-
processNibble
private boolean processNibble(int input)
-