mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-21 01:29:06 +00:00
07edf96440
Prior to the cmake conversion, several private classes had methods that were exported into the shared library so they could be tested with libtests. With cmake, we build libtests using an object library, so this is no longer necessary. The methods that are disappearing from the ABI were never exposed through public headers, so no code should be using them. Removal had to wait until the window for ABI-breaking changes was open.
29 lines
657 B
C++
29 lines
657 B
C++
// Write bits into a bit stream. See BitStream for reading.
|
|
|
|
#ifndef BITWRITER_HH
|
|
#define BITWRITER_HH
|
|
|
|
#include <stddef.h>
|
|
|
|
class Pipeline;
|
|
|
|
class 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 long val, size_t bits);
|
|
void writeBitsSigned(long long val, size_t bits);
|
|
void writeBitsInt(int val, size_t bits);
|
|
// Force any partial byte to be written to the pipeline.
|
|
void flush();
|
|
|
|
private:
|
|
Pipeline* pl;
|
|
unsigned char ch;
|
|
size_t bit_offset;
|
|
};
|
|
|
|
#endif // BITWRITER_HH
|