Unary012,
Unary210,
LimitedUnary(u32, u32),
+ LimitedZeroes(u32),
+ LimitedOnes(u32),
Golomb(u8),
Rice(u8),
Gamma,
match t {
UintCodeType::UnaryOnes => read_unary(self, 0),
UintCodeType::UnaryZeroes => read_unary(self, 1),
+ UintCodeType::LimitedZeroes(len) => read_unary_lim(self, len, 1),
+ UintCodeType::LimitedOnes(len) => read_unary_lim(self, len, 0),
UintCodeType::LimitedUnary(len, term) => read_unary_lim(self, len, term),
UintCodeType::Unary012 => read_unary_lim(self, 2, 0),
UintCodeType::Unary210 => read_unary210(self),
fn int_codes() {
const GDATA: [u8; 6] = [0b000_001_01, 0b0_0110_011, 0b1_1000_100, 0b1_1010_101, 0b10_10111_1, 0b1000_0000];
let src = &GDATA;
- let mut br = BitReader::new(src, src.len(), BitReaderMode::BE);
+ let mut br = BitReader::new(src, BitReaderMode::BE);
for i in 0..11 {
assert_eq!(br.read_code(UintCodeType::Golomb(5)).unwrap(), i);
}