mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-23 19:39:04 +00:00
f71eb2af91
git-svn-id: svn+q:///qpdf/trunk@797 71b93d88-0707-0410-a8cf-f5a4172ac649
27 lines
582 B
C++
27 lines
582 B
C++
// Write bits into a bit stream. See BitStream for reading.
|
|
|
|
#ifndef __BITWRITER_HH__
|
|
#define __BITWRITER_HH__
|
|
|
|
#include <qpdf/DLL.hh>
|
|
|
|
class Pipeline;
|
|
|
|
class DLL_EXPORT BitWriter
|
|
{
|
|
public:
|
|
// Write bits to the pipeline. It is the caller's responsibility
|
|
// to eventually call finish on the pipeline.
|
|
BitWriter(Pipeline* pl);
|
|
void writeBits(unsigned long val, int bits);
|
|
// Force any partial byte to be written to the pipeline.
|
|
void flush();
|
|
|
|
private:
|
|
Pipeline* pl;
|
|
unsigned char ch;
|
|
unsigned int bit_offset;
|
|
};
|
|
|
|
#endif // __BITWRITER_HH__
|