29 #include <boost/cstdint.hpp>
41 typedef unsigned char byte;
66 usedBits(from.usedBits)
89 unsigned read_uint(
unsigned short bitcount);
100 boost::int32_t read_sint(
unsigned short bitcount);
112 return static_cast<boost::int8_t
>(read_u8());
120 boost::uint16_t result = *ptr++;
121 result |= *ptr++ << 8;
128 return static_cast<boost::int16_t
>(read_u16());
136 boost::uint32_t result = *ptr++;
137 result |= *ptr++ << 8;
138 result |= *ptr++ << 16;
139 result |= *ptr++ << 24;
146 return static_cast<boost::int32_t
>(read_u32());
154 if ( usedBits ) advanceToNextByte();
160 boost::uint32_t gotbits = 8-usedBits +8*(
end-ptr-1);
161 if (gotbits > nbits)
return true;
167 void advanceToNextByte()
171 log_debug(
_(
"Going round"));
195 #endif // BITSREADER_H