blob: d02eea42bc466bea2c2b3a9ce15633c4384334ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Read bits from a bit stream. See BitWriter for writing.
#ifndef __BITSTREAM_HH__
#define __BITSTREAM_HH__
class BitStream
{
public:
BitStream(unsigned char const* p, int nbytes);
void reset();
unsigned long getBits(int nbits);
void skipToNextByte();
private:
unsigned char const* start;
int nbytes;
unsigned char const* p;
unsigned int bit_offset;
unsigned int bits_available;
};
#endif // __BITSTREAM_HH__
|