Package io.netty.handler.codec.http2
Class HpackHuffmanDecoder
java.lang.Object
io.netty.handler.codec.http2.HpackHuffmanDecoder
- All Implemented Interfaces:
ByteProcessor
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.util.ByteProcessor
ByteProcessor.IndexNotOfProcessor, ByteProcessor.IndexOfProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Http2Exception
private byte[]
private static final byte
private static final int
private static final byte
private static final int
private static final byte
private static final int
private static final int[]
A table of byte tuples (state, flags, output).private int
private int
Fields inherited from interface io.netty.util.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.boolean
process
(byte input) This should never be called from anything but this class itself!private boolean
processNibble
(int input)
-
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:
process
in interfaceByteProcessor
- Returns:
true
if the processor wants to continue the loop and handle the next byte in the buffer.false
if the processor wants to stop handling bytes and abort the loop.
-
processNibble
private boolean processNibble(int input)
-