Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
libebook::EBOOKBitStream Class Reference

`#include <EBOOKBitStream.h>`

## Public Member Functions
| EBOOKBitStream (librevenge::RVNGInputStream *stream)
uint32_t | read (uint8_t numberOfBits, bool bigEndian=false)
bool | isEnd () const
bool | atLastByte () const

## Private Member Functions
void | fill ()
uint8_t | readByte ()
| Reads a byte from the stream. More...
uint8_t | readBits (uint8_t numberOfBits)
| Reads a given amount of bits from the stream. More...
uint8_t | readAvailableBits (uint8_t numberOfBits)

## Private Attributes
librevenge::RVNGInputStream *const | m_stream
uint8_t | m_current
uint8_t | m_available

## Static Private Attributes
static const uint8_t | s_masks [8] = { 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff }

## Constructor & Destructor Documentation

## § EBOOKBitStream()

libebook::EBOOKBitStream::EBOOKBitStream | ( | librevenge::RVNGInputStream * | stream | ) |
| explicit

## Member Function Documentation

## § atLastByte()

bool libebook::EBOOKBitStream::atLastByte | ( |  | ) | const

Referenced by isEnd().

## § fill()

void libebook::EBOOKBitStream::fill | ( |  | ) |
| private

Referenced by atLastByte(), and readBits().

## § isEnd()

bool libebook::EBOOKBitStream::isEnd | ( |  | ) | const

## § read()

uint32_t libebook::EBOOKBitStream::read | ( | uint8_t | numberOfBits,
|  | bool | bigEndian = `false`
| ) |  |

## § readAvailableBits()

uint8_t libebook::EBOOKBitStream::readAvailableBits | ( | uint8_t | numberOfBits | ) |
| private

Referenced by readBits().

## § readBits()

uint8_t libebook::EBOOKBitStream::readBits | ( | uint8_t | numberOfBits | ) |
| private

Reads a given amount of bits from the stream.

- [in] numberOfBits the number of bits to read. Has to be less than or equal to 8.

Returns
  a byte containing the bits

Referenced by read(), and readByte().

## § readByte()

uint8_t libebook::EBOOKBitStream::readByte | ( |  | ) |
| private

Reads a byte from the stream.

Returns
  a byte

Referenced by read().

## Member Data Documentation

## § m_available

uint8_t libebook::EBOOKBitStream::m_available
| private

Referenced by fill(), isEnd(), readAvailableBits(), and readBits().

## § m_current

uint8_t libebook::EBOOKBitStream::m_current
| private

Referenced by fill(), and readAvailableBits().

## § m_stream

librevenge::RVNGInputStream* const libebook::EBOOKBitStream::m_stream
| private

Referenced by atLastByte(), and fill().

## § s_masks

const uint8_t libebook::EBOOKBitStream::s_masks = { 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff }
| static private

Referenced by readAvailableBits().

The documentation for this class was generated from the following files:

- EBOOKBitStream.h
- EBOOKBitStream.cpp