int[] lens = c.bitLens();
System.out.println(Arrays.toString(values));
System.out.println(Arrays.toString(lens));
EncodingParams params = HuffmanIntegerEncoding.toParam(values, lens);
HuffmanIntegerEncoding e = new HuffmanIntegerEncoding();
e.fromByteArray(params.params);
BitCodec<Integer> codec = e.buildCodec(null, null);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DefaultBitOutputStream bos = new DefaultBitOutputStream(baos);
for (int i = 0; i < names.length; i++) {
codec.write(bos, names[i].length());
}
bos.close();
codec = e.buildCodec(null, null);
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
DefaultBitInputStream bis = new DefaultBitInputStream(bais);
for (int i = 0; i < names.length; i++) {
int v = codec.read(bis);