Top Fields Constructors Methods
io.netty.handler.codec.http2

pack-priv final Class HpackHuffmanDecoder

extends Object
implements ByteProcessor
Class Inheritance
All Implemented Interfaces
io.netty.util.ByteProcessor
Imports
io.netty.buffer.ByteBuf, io.netty.util.AsciiString, .ByteProcessor

Field Summary

Modifier and TypeField and Description
private 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[]
HUFFS

A table of byte tuples (state, flags, output).

private int
k

private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AsciiString

Returns:

the output stream for the compressed data
decode
(ByteBuf
the string literal to be decoded
buf
,
int length)

Decompresses the given Huffman coded string literal.

public boolean
process(byte input)

Implements io.netty.util.ByteProcessor.process.

This should never be called from anything but this class itself!
private boolean
processNibble(int input)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BAD_ENCODINGback to summary
private static final Http2Exception BAD_ENCODING
destback to summary
private byte[] dest
HUFFMAN_COMPLETEback to summary
private static final byte HUFFMAN_COMPLETE
HUFFMAN_COMPLETE_SHIFTback to summary
private static final int HUFFMAN_COMPLETE_SHIFT
HUFFMAN_EMIT_SYMBOLback to summary
private static final byte HUFFMAN_EMIT_SYMBOL
HUFFMAN_EMIT_SYMBOL_SHIFTback to summary
private static final int HUFFMAN_EMIT_SYMBOL_SHIFT
HUFFMAN_FAILback to summary
private static final byte HUFFMAN_FAIL
HUFFMAN_FAIL_SHIFTback to summary
private static final int HUFFMAN_FAIL_SHIFT
HUFFSback to summary
private static final int[] HUFFS

A table of byte tuples (state, flags, output). They are packed together as:

state<<16 + flags<<8 + output

kback to summary
private int k
stateback to summary
private int state

Constructor Detail

HpackHuffmanDecoderback to summary
pack-priv HpackHuffmanDecoder()

Method Detail

decodeback to summary
public AsciiString decode(ByteBuf buf, int length) throws Http2Exception

Decompresses the given Huffman coded string literal.

Parameters
buf:ByteBuf

the string literal to be decoded

Returns:AsciiString

the output stream for the compressed data

Exceptions
Http2Exception:
EOS Decoded
processback to summary
public boolean process(byte input)

Implements io.netty.util.ByteProcessor.process.

This should never be called from anything but this class itself!

Returns:boolean

Doc from io.netty.util.ByteProcessor.process.

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.

Annotations
@Override
processNibbleback to summary
private boolean processNibble(int input)