int[] lens = new int[] { 1, 2, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8 };
CanonicalHuffmanIntegerCodec c = new CanonicalHuffmanIntegerCodec(values,
lens);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DefaultBitOutputStream bos = new DefaultBitOutputStream(baos);
for (int b : values) {
c.write(bos, b);
}
bos.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
DefaultBitInputStream bis = new DefaultBitInputStream(bais);
for (int b : values) {