Class HuffmanDecoder

java.lang.Object
org.eclipse.jetty.http.compression.HuffmanDecoder

public class HuffmanDecoder extends Object

Used to decoded Huffman encoded strings.

Characters which are illegal field-vchar values are replaced with either ' ' or '?' as described in RFC9110

  • Field Details

    • _builder

    • _length

      private int _length
    • _count

      private int _count
    • _node

      private int _node
    • _current

      private int _current
    • _bits

      private int _bits
  • Constructor Details

    • HuffmanDecoder

      public HuffmanDecoder()
  • Method Details

    • setLength

      public void setLength(int length)
      Parameters:
      length - in bytes of the huffman data.
    • decode

      public String decode(ByteBuffer buffer) throws EncodingException
      Parameters:
      buffer - the buffer containing the Huffman encoded bytes.
      Returns:
      the decoded String.
      Throws:
      EncodingException - if the huffman encoding is invalid.
    • reset

      public void reset()