FastByteArrayInputStream codesIs = new FastByteArrayInputStream(b);
BitInputStream codesBis = new BitInputStream(codesIs);
int[] codes = new int[totalEntries];
unpack(codesBis, bitwidth, codes, totalEntries);
int exceptions = dis.readShort();
CharArrayList exceptionList = new CharArrayList(exceptions);
for(int i = 0; i < exceptions; i++) {
char c = dis.readChar();
exceptionList.add(c);
}
return new CompressedSegment(totalEntries, bitwidth, firstException, codes, exceptionList);
}