int golombRiceLogM = 2;
GolombRiceIntegerCodec codec = new GolombRiceIntegerCodec(
golombRiceLogM);
for (int i = 0; i < 256; i++) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
BitOutputStream bos = new DefaultBitOutputStream(baos);
int len = (int) codec.write(bos, i);
bos.flush();
byte[] buf = baos.toByteArray();
ByteArrayInputStream bais = new ByteArrayInputStream(buf);
BitInputStream bis = new DefaultBitInputStream(bais);