Foxit PDF SDK
CFX_BitWriter Class Reference

Inherits CFX_Object.

Public Member Functions

 CFX_BitWriter (CFX_BinaryBuf *pBinBuf)
 A constructor with bits write. More...
 
void ByteAlign ()
 Get to byte boundary. If current bit position is not multiplication of 8, the rest of the current byte will be skipped. More...
 
int GetCurBytePos ()
 Get current byte position. More...
 
void WriteBits (FX_INT64 value, FX_INT32 nBits)
 Write a value of bits. More...
 

Detailed Description

The class represents Bit Writer, writting a value to a continuous bit stream (starting at byte boundary).

Constructor & Destructor Documentation

◆ CFX_BitWriter()

CFX_BitWriter::CFX_BitWriter ( CFX_BinaryBuf pBinBuf)
inline

A constructor with bits write.

Parameters
[in]pBinBufThe dynamic binary buffer.

Member Function Documentation

◆ ByteAlign()

void CFX_BitWriter::ByteAlign ( )

Get to byte boundary. If current bit position is not multiplication of 8, the rest of the current byte will be skipped.

Returns
None.

◆ GetCurBytePos()

int CFX_BitWriter::GetCurBytePos ( )
inline

Get current byte position.

Returns
Return the current byte position.

◆ WriteBits()

void CFX_BitWriter::WriteBits ( FX_INT64  value,
FX_INT32  nBits 
)

Write a value of bits.

Parameters
[in]valueThe value to be written.
[in]nBitsThe number of bits to be written.
Returns
None.