# bm::decoder Class Reference

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

`#include <encoding.h>`

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

## Public Member Functions

| decoder (const unsigned char *buf)
| Construction.
bm::short_t | get_16 ()
| Reads 16bit word from the decoding buffer.
bm::word_t | get_32 ()
| Reads 32 bit word from the decoding buffer.
void | get_32 (bm::word_t *w, unsigned count)
| Reads block of 32-bit words from the decoding buffer.
void | get_16 (bm::short_t *s, unsigned count)
| Reads block of 32-bit words from the decoding buffer.

## Detailed Description

Class for decoding data from memory buffer.

Properly handles aligment issues with integer data types.

Definition at line 97 of file encoding.h.

## Constructor & Destructor Documentation

bm::decoder::decoder | ( | const unsigned char * | buf | ) | `[inline]`

Construction.

Parameters:

  | buf | - pointer to the decoding memory.

Definition at line 687 of file encoding.h.

## Member Function Documentation

void bm::decoder::get_16 | ( | bm::short_t * | s,
|  | unsigned | count |
| ) |  |  | `[inline]`

Reads block of 32-bit words from the decoding buffer.

Parameters:

  | s | - pointer on memory block to read into.
  | count | - size of memory block in words.

Definition at line 761 of file encoding.h.

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

BMFORCEINLINE bm::short_t bm::decoder::get_16 | ( |  | ) |

Reads 16bit word from the decoding buffer.

Definition at line 696 of file encoding.h.

References bm::decoder_base::buf_.

void bm::decoder::get_32 | ( | bm::word_t * | w,
|  | unsigned | count |
| ) |  |  | `[inline]`

Reads block of 32-bit words from the decoding buffer.

Parameters:

  | w | - pointer on memory block to read into.
  | count | - size of memory block in words.

Definition at line 730 of file encoding.h.

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

BMFORCEINLINE bm::word_t bm::decoder::get_32 | ( |  | ) |

Reads 32 bit word from the decoding buffer.

Definition at line 711 of file encoding.h.

References bm::decoder_base::buf_.

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

- encoding.h