fn decode<I: Iterator<Item=u8>>(&self, bitreader:&mut Bits<I>) -> Option<u16> {
		let mut index:usize = 0;
		let mut index_code:u16 = 0;
		let mut read_code:u16 = 0;
		let mut read_len:u4 = u4::_0;

		//eprintln!("Enter");
		//eprintln!("  self: {:?}", self);
		loop {
			//eprintln!("  Start of loop");
			while read_len < self.backing[index].length {
				read_code += if bitreader.next()? { read_len.nth_bit() } else { 0 };
				read_len += u4::_1;
				//eprintln!("    Read Code: {:0w$b}", read_code, w = usize::from(read_len));
			}
			if read_len == self.backing[index].length &&
					read_code == index_code {
				//eprintln!("    Ret Code: {:0w$b}", read_code, w = usize::from(read_len));
				//eprintln!("    Retval: {}", self.backing[index].value);
				break Some(self.backing[index].value)
			}
			index_code = u16_reverse_bits(index_code);
			index_code += (u4::_F - self.backing[index].length + u4::_1).nth_bit();
			index_code = u16_reverse_bits(index_code);
			index += 1;
			if index >= self.backing.len() {
				panic!("Code not found");
			}
			//eprintln!("    Index Code: {:0w$b}", index_code, w = usize::from(self.backing[index].length));
		}
	}
/// Decodes a value using this set of dynamic huffman codes
Decodes a value using this set of dynamic huffman codes
Decodes a value using this set of dynamic huffman codes
fn decode<I: Iterator<Item=u8>>(&self, bitreader:&mut Bits<I>) -> Option<u16> {
		let mut index:usize = 0;
		let mut index_code:u16 = 0;
		let mut read_code:u16 = 0;
		let mut read_len:u4 = u4::_0;
		//eprintln!("Enter");
		//eprintln!("  self: {:?}", self);
		loop {
			//eprintln!("  Start of loop");
			while read_len < self.backing[index].length {
				read_code += if bitreader.next()? { read_len.nth_bit() } else { 0 };
				read_len += u4::_1;
				//eprintln!("    Read Code: {:0w$b}", read_code, w = usize::from(read_len));
			}
			if read_len == self.backing[index].length &&
					read_code == index_code {
				//eprintln!("    Ret Code: {:0w$b}", read_code, w = usize::from(read_len));
				//eprintln!("    Retval: {}", self.backing[index].value);
				break Some(self.backing[index].value)
			}
			index_code = u16_reverse_bits(index_code);
			index_code += (u4::_F - self.backing[index].length + u4::_1).nth_bit();
			index_code = u16_reverse_bits(index_code);
			index += 1;
			if index >= self.backing.len() {
				panic!("Code not found");
			}
			//eprintln!("    Index Code: {:0w$b}", index_code, w = usize::from(self.backing[index].length));
		}
	}
fn decode < I : Iterator < Item = u8 > > ( & self , bitreader : & mut Bits < I > ) -> Option < u16 > { let mut index : usize = 0 ; let mut index_code : u16 = 0 ; let mut read_code : u16 = 0 ; let mut read_len : u4 = u4 :: _0 ; //eprintln!("Enter"); //eprintln!("  self: {:?}", self); loop { //eprintln!("  Start of loop"); while read_len < self . backing [ index ] . length { read_code += if bitreader . next ( ) ? { read_len . nth_bit ( ) } else { 0 } ; read_len += u4 :: _1 ; //eprintln!("    Read Code: {:0w$b}", read_code, w = usize::from(read_len)); } if read_len == self . backing [ index ] . length && read_code == index_code { //eprintln!("    Ret Code: {:0w$b}", read_code, w = usize::from(read_len)); //eprintln!("    Retval: {}", self.backing[index].value); break Some ( self . backing [ index ] . value ) } index_code = u16_reverse_bits ( index_code ) ; index_code += ( u4 :: _F - self . backing [ index ] . length + u4 :: _1 ) . nth_bit ( ) ; index_code = u16_reverse_bits ( index_code ) ; index += 1 ; if index >= self . backing . len ( ) { panic ! ( " " ) ; } //eprintln!("    Index Code: {:0w$b}", index_code, w = usize::from(self.backing[index].length)); } }
Decodes a value using this set of dynamic huffman codes
Decodes a value using this set of dynamic huffman codes
&self
bitreader
&mut Bits<I>