2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-28 17:48:27 +00:00
qpdf/libqpdf/qpdf/BitStream.hh
Jay Berkenbilt 748ab301d4 go back to function-based DLL_EXPORT rather than class-based to avoid creation of export files with executables under msvc
git-svn-id: svn+q:///qpdf/trunk@849 71b93d88-0707-0410-a8cf-f5a4172ac649
2009-10-21 00:27:24 +00:00

30 lines
539 B
C++

// Read bits from a bit stream. See BitWriter for writing.
#ifndef __BITSTREAM_HH__
#define __BITSTREAM_HH__
#include <qpdf/DLL.h>
class BitStream
{
public:
DLL_EXPORT
BitStream(unsigned char const* p, int nbytes);
DLL_EXPORT
void reset();
DLL_EXPORT
unsigned long getBits(int nbits);
DLL_EXPORT
void skipToNextByte();
private:
unsigned char const* start;
int nbytes;
unsigned char const* p;
unsigned int bit_offset;
unsigned int bits_available;
};
#endif // __BITSTREAM_HH__