static protected String printCodeBook(final BitVector[] codeWords,final Symbol2Byte symbol2byte){
  final StringBuilder sb=new StringBuilder();
{
    int symbol=0;
    for (    BitVector v : codeWords) {
      final byte b=symbol2byte.symbol2byte(symbol);
      sb.append("codeWord: " + v + ", symbol="+ symbol+ ", value="+ b+ (b >= 32 && b < 127 ? " (" + (char)b + ")" : "")+ "\n");
      symbol++;
    }
  }
  return sb.toString();
}

static protected String printCodeBook ( final BitVector [ ] codeWords , final Symbol2Byte symbol2byte ) { final StringBuilder sb = new StringBuilder ( ) ; { int symbol = 0 ; for ( BitVector v : codeWords ) { final byte b = symbol2byte . symbol2byte ( symbol ) ; sb . append ( "codeWord: " + v + ", symbol=" + symbol + ", value=" + b + ( b >= 32 && b < 127 ? " (" + ( char ) b + ")" : "" ) + "\n" ) ; symbol ++ ; } } return sb . toString ( ) ; }
format the code book as a multi - line string .
