bm::decoder_base Class Reference
Elias Gamma Code (internal)

Base class for all decoding functionality. More...

`#include <encoding.h>`

Inheritance diagram for bm::decoder_base:
[legend]

## Public Member Functions

| decoder_base (const unsigned char *buf) BMNOEXCEPT
unsigned char | get_8 () BMNOEXCEPT
| Reads character from the decoding buffer.
size_t | size () const BMNOEXCEPT
| Returns size of the current decoding stream.
void | seek (int delta) BMNOEXCEPT
| change current position
void | memcpy (unsigned char *dst, size_t count) BMNOEXCEPT
| read bytes from the decode buffer
const unsigned char * | get_pos () const BMNOEXCEPT
| Return current buffer pointer.
void | set_pos (const unsigned char *pos) BMNOEXCEPT
| Set current buffer pointer.
bm::id64_t | get_h64 () BMNOEXCEPT
| Read h-64-bit.

## Protected Attributes

const unsigned char * | buf_
const unsigned char * | start_

## Detailed Description

Base class for all decoding functionality.

Definition at line 87 of file encoding.h.

## Constructor & Destructor Documentation

## decoder_base()

bm::decoder_base::decoder_base | ( | const unsigned char * | buf | ) |

inline

Definition at line 90 of file encoding.h.

References BMNOEXCEPT, buf_, and start_.

Referenced by bm::decoder::decoder(), and bm::decoder_little_endian::decoder_little_endian().

## Member Function Documentation

## get_8()

unsigned char bm::decoder_base::get_8 | ( |  | ) |

inline

Reads character from the decoding buffer.

Definition at line 93 of file encoding.h.

References BMNOEXCEPT, and buf_.

Referenced by bm::compressed_collection_deserializer< CBC >::deserialize(), bm::deserialize(), bm::operation_deserializer< BV >::deserialize(), bm::deserialize_range(), bm::operation_deserializer< BV >::deserialize_range(), bm::sparse_vector_deserializer< SV >::load_header(), bm::sparse_vector_deserializer< SV >::load_planes_off_table(), bm::sparse_vector_deserializer< SV >::load_remap(), bm::deseriaizer_base< DEC, BLOCK_IDX >::read_gap_block(), bm::deseriaizer_base< DEC, BLOCK_IDX >::read_id_list(), and bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().

## get_h64()

bm::id64_t bm::decoder_base::get_h64 | ( |  | ) |

inline

Read h-64-bit.

Reads 64-bit word from the decoding buffer.

Definition at line 691 of file encoding.h.

References BMNOEXCEPT, and buf_.

## get_pos()

const unsigned char * bm::decoder_base::get_pos | ( |  | ) | const

inline

Return current buffer pointer.

Definition at line 105 of file encoding.h.

References BMNOEXCEPT, and buf_.

Referenced by bm::compressed_collection_deserializer< CBC >::deserialize(), and bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().

## memcpy()

void bm::decoder_base::memcpy | ( | unsigned char * | dst,
|  | size_t | count )

inline

read bytes from the decode buffer

Load bytes from the decode buffer

Definition at line 679 of file encoding.h.

References BMNOEXCEPT, buf_, and bm::encoder::memcpy().

Referenced by bm::compressed_collection_deserializer< CBC >::deserialize(), and bm::sparse_vector_deserializer< SV >::load_remap().

## seek()

void bm::decoder_base::seek | ( | int | delta | ) |

inline

change current position

Definition at line 99 of file encoding.h.

References BMNOEXCEPT, and buf_.

Referenced by bm::compressed_collection_deserializer< CBC >::deserialize(), bm::decoder::get_16(), bm::decoder_little_endian::get_16(), bm::decoder::get_32(), bm::decoder_little_endian::get_32(), bm::decoder::get_32_AND(), bm::decoder::get_32_OR(), and bm::decoder_little_endian::get_32_OR().

## set_pos()

void bm::decoder_base::set_pos | ( | const unsigned char * | pos | ) |

inline

Set current buffer pointer.

Definition at line 108 of file encoding.h.

References BMNOEXCEPT, and buf_.

Referenced by bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().

## size()

size_t bm::decoder_base::size | ( |  | ) | const

inline

Returns size of the current decoding stream.

Definition at line 96 of file encoding.h.

References BMNOEXCEPT, buf_, and start_.

## Field Documentation

## buf_

const unsigned char* bm::decoder_base::buf_

protected

Definition at line 114 of file encoding.h.

Referenced by decoder_base(), bm::decoder::get_16(), bm::decoder::get_16(), bm::decoder_little_endian::get_16(), bm::decoder_little_endian::get_16(), bm::decoder::get_24(), bm::decoder_little_endian::get_24(), bm::decoder::get_32(), bm::decoder::get_32(), bm::decoder_little_endian::get_32(), bm::decoder_little_endian::get_32(), bm::decoder::get_32_AND(), bm::decoder::get_32_OR(), bm::decoder::get_48(), bm::decoder_little_endian::get_48(), bm::decoder::get_64(), bm::decoder_little_endian::get_64(), get_8(), get_h64(), get_pos(), memcpy(), seek(), set_pos(), and size().

## start_

const unsigned char* bm::decoder_base::start_

protected

Definition at line 115 of file encoding.h.

Referenced by decoder_base(), and size().

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

- encoding.h