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 .