Foxit PDF SDK

Public Member Functions | List of all members
CFX_BitWriter Class Reference
FXCRT

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] | pBinBuf | The 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] | value | The value to be written.
  [in] | nBits | The number of bits to be written.

Returns
  None.