hpack/src/main/java/com/twitter/hpack/HuffmanEncoder.java
public int getEncodedLength(byte[] data) {
    if (data == null) {
      throw new NullPointerException("data");
    }
    long len = 0;
    for (byte b : data) {
      len += lengths[b & 0xFF];
    }
    return (int)((len + 7) >> 3);
  }
public int getEncodedLength(byte[] data) {
    if (data == null) {
      throw new NullPointerException("data");
    }
    long len = 0;
    for (byte b : data) {
      len += lengths[b & 0xFF];
    }
    return (int)((len + 7) >> 3);
  }
public int getEncodedLength ( byte [ ] data ) { if ( data == null ) { throw new NullPointerException ( "data" ) ; } long len = 0 ; for ( byte b : data ) { len += lengths [ b & 0xFF ] ; } return ( int ) ( ( len + 7 ) >> 3 ) ; }
Returns the number of bytes required to Huffman encode the input string literal.
@param  data the string literal to be Huffman encoded
@return the number of bytes required to Huffman encode <code>data</code>
Returns the number of bytes required to Huffman encode the input string literal .