@Test(dataProvider = "tests") public void paramsTest(final int offset, final int bitLength, final byte[] expected) { final BetaIntegerEncoding constructed = new BetaIntegerEncoding(offset, bitLength); Assert.assertEquals(constructed.toByteArray(), expected); final BetaIntegerEncoding fromParams = BetaIntegerEncoding.fromParams(expected); Assert.assertEquals(fromParams.toByteArray(), expected); }
return (CRAMEncoding<T>) GolombRiceIntegerEncoding.fromParams(params); case BETA: return (CRAMEncoding<T>) BetaIntegerEncoding.fromParams(params); case GAMMA: return (CRAMEncoding<T>) GammaIntegerEncoding.fromParams(params);
return (CRAMEncoding<T>) GolombRiceIntegerEncoding.fromParams(params); case BETA: return (CRAMEncoding<T>) BetaIntegerEncoding.fromParams(params); case GAMMA: return (CRAMEncoding<T>) GammaIntegerEncoding.fromParams(params);