748749750751752753754755756757758
{ // check if beta is better: int betaLength = (int) Math.round(Math.log(max) / Math.log(2) + 0.5); if (bits > betaLength * count) { bestEncoding = new BetaIntegerEncoding(betaLength); bits = betaLength * count; } } { // try huffman: