BitMagic-C++: bm::decoder_little_endian Class Reference

BitMagic-C++

Public Member Functions
bm::decoder_little_endian Class Reference
Elias Gamma Code (internal)

Class for decoding data from memory buffer. More...

`#include <encoding.h>`

Inheritance diagram for bm::decoder_little_endian:
[legend]
Collaboration diagram for bm::decoder_little_endian:
[legend]

## Public Member Functions
| decoder_little_endian (const unsigned char *buf)
bm::short_t | get_16 ()
bm::word_t | get_24 ()
bm::word_t | get_32 ()
bm::id64_t | get_48 ()
bm::id64_t | get_64 ()
void | get_32 (bm::word_t *w, unsigned count)
bool | get_32_OR (bm::word_t *w, unsigned count)
void | get_32_AND (bm::word_t *w, unsigned count)
void | get_16 (bm::short_t *s, unsigned count)
Public Member Functions inherited from bm::decoder_base
| decoder_base (const unsigned char *buf) BMNOEXCEPT
unsigned char | get_8 () BMNOEXCEPT
| Reads character from the decoding buffer. More...
size_t | size () const BMNOEXCEPT
| Returns size of the current decoding stream. More...
void | seek (int delta) BMNOEXCEPT
| change current position More...
void | memcpy (unsigned char *dst, size_t count) BMNOEXCEPT
| read bytes from the decode buffer More...
const unsigned char * | get_pos () const BMNOEXCEPT
| Return current buffer pointer. More...
void | set_pos (const unsigned char *pos) BMNOEXCEPT
| Set current buffer pointer. More...

## Additional Inherited Members
Protected Attributes inherited from bm::decoder_base
const unsigned char * | buf_
const unsigned char * | start_

## Detailed Description

Class for decoding data from memory buffer.

Properly handles aligment issues with integer data types. Converts data to little endian architecture (presumed it was encoded as big endian)

Definition at line 151 of file encoding.h.

## Constructor & Destructor Documentation

## ◆ decoder_little_endian()

bm::decoder_little_endian::decoder_little_endian | ( | const unsigned char * | buf | ) |
| inline

Definition at line 868 of file encoding.h.

## Member Function Documentation

## ◆ get_16() [1/2]

bm::short_t bm::decoder_little_endian::get_16 | ( |  | ) |
| inline

Definition at line 874 of file encoding.h.

References bm::decoder_base::buf_.

## ◆ get_16() [2/2]

void bm::decoder_little_endian::get_16 | ( | bm::short_t * | s,
|  | unsigned | count
| ) |  |
| inline

Definition at line 986 of file encoding.h.

References bm::decoder_base::buf_, and bm::decoder_base::seek().

## ◆ get_24()

bm::word_t bm::decoder_little_endian::get_24 | ( |  | ) |
| inline

Definition at line 883 of file encoding.h.

References bm::decoder_base::buf_.

## ◆ get_32() [1/2]

bm::word_t bm::decoder_little_endian::get_32 | ( |  | ) |
| inline

Definition at line 893 of file encoding.h.

References bm::decoder_base::buf_.

Referenced by get_32_AND(), and get_32_OR().

## ◆ get_32() [2/2]

void bm::decoder_little_endian::get_32 | ( | bm::word_t * | w,
|  | unsigned | count
| ) |  |
| inline

Definition at line 930 of file encoding.h.

References bm::decoder_base::buf_, and bm::decoder_base::seek().

## ◆ get_32_AND()

void bm::decoder_little_endian::get_32_AND | ( | bm::word_t * | w,
|  | unsigned | count
| ) |  |
| inline

Definition at line 973 of file encoding.h.

References get_32().

## ◆ get_32_OR()

bool bm::decoder_little_endian::get_32_OR | ( | bm::word_t * | w,
|  | unsigned | count
| ) |  |
| inline

Definition at line 951 of file encoding.h.

References get_32(), and bm::decoder_base::seek().

## ◆ get_48()

bm::id64_t bm::decoder_little_endian::get_48 | ( |  | ) |
| inline

Definition at line 902 of file encoding.h.

References bm::decoder_base::buf_.

## ◆ get_64()

bm::id64_t bm::decoder_little_endian::get_64 | ( |  | ) |
| inline

Definition at line 915 of file encoding.h.

References bm::decoder_base::buf_.

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

- encoding.h