|
BitMagic-C++
|
Class for decoding data from memory buffer. More...
#include <encoding.h>


Public Member Functions | |
| decoder (const unsigned char *buf) BMNOEXCEPT | |
| Construction. | |
| bm::short_t | get_16 () BMNOEXCEPT |
| Reads 16-bit word from the decoding buffer. | |
| bm::word_t | get_24 () BMNOEXCEPT |
| Reads 32-bit word from the decoding buffer. | |
| bm::word_t | get_32 () BMNOEXCEPT |
| Reads 32-bit word from the decoding buffer. | |
| bm::id64_t | get_48 () BMNOEXCEPT |
| Reads 64-bit word from the decoding buffer. | |
| bm::id64_t | get_64 () BMNOEXCEPT |
| Reads 64-bit word from the decoding buffer. | |
| void | get_32 (bm::word_t *w, unsigned count) BMNOEXCEPT |
| Reads block of 32-bit words from the decoding buffer. | |
| bool | get_32_OR (bm::word_t *w, unsigned count) BMNOEXCEPT |
| Reads block of 32-bit words from the decoding buffer and ORs to the destination. | |
| void | get_32_AND (bm::word_t *w, unsigned count) BMNOEXCEPT |
| Reads block of 32-bit words from the decoding buffer and ANDs to the destination. | |
| void | get_16 (bm::short_t *s, unsigned count) BMNOEXCEPT |
| Reads block of 32-bit words from the decoding buffer. | |
| 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. | |
| 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. | |
Additional Inherited Members | |
| Protected Attributes inherited from bm::decoder_base | |
| const unsigned char * | buf_ |
| const unsigned char * | start_ |
Class for decoding data from memory buffer.
Properly handles aligment issues with integer data types.
Definition at line 125 of file encoding.h.
|
inline |
Construction.
| buf | - pointer to the decoding memory. |
Definition at line 713 of file encoding.h.
References BMNOEXCEPT, and bm::decoder_base::decoder_base().
| BMFORCEINLINE bm::short_t bm::decoder::get_16 | ( | ) |
Reads 16-bit word from the decoding buffer.
Definition at line 722 of file encoding.h.
References BMFORCEINLINE, BMNOEXCEPT, bm::decoder_base::buf_, and bm::encoder::memcpy().
Referenced by 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().
|
inline |
Reads block of 32-bit words from the decoding buffer.
| s | - pointer on memory block to read into. |
| count | - size of memory block in words. |
Definition at line 923 of file encoding.h.
References BM_ASSERT, BMNOEXCEPT, bm::decoder_base::buf_, bm::encoder::memcpy(), and bm::decoder_base::seek().
|
inline |
Reads 32-bit word from the decoding buffer.
Definition at line 738 of file encoding.h.
References BMNOEXCEPT, and bm::decoder_base::buf_.
Referenced by bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().
| BMFORCEINLINE bm::word_t bm::decoder::get_32 | ( | ) |
Reads 32-bit word from the decoding buffer.
Definition at line 751 of file encoding.h.
References BMFORCEINLINE, BMNOEXCEPT, bm::decoder_base::buf_, and bm::encoder::memcpy().
Referenced by get_32_AND(), get_32_OR(), bm::sparse_vector_deserializer< SV >::load_planes_off_table(), bm::sparse_vector_deserializer< SV >::load_remap(), and bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().
|
inline |
Reads block of 32-bit words from the decoding buffer.
| w | - pointer on memory block to read into. |
| count | - size of memory block in words. |
Definition at line 812 of file encoding.h.
References BMNOEXCEPT, bm::decoder_base::buf_, bm::encoder::memcpy(), and bm::decoder_base::seek().
|
inline |
Reads block of 32-bit words from the decoding buffer and ANDs to the destination.
| w | - pointer on memory block to read into |
| count | - should match bm::set_block_size |
Definition at line 885 of file encoding.h.
References bm::avx2_and_arr_unal(), BMNOEXCEPT, bm::decoder_base::buf_, get_32(), bm::decoder_base::seek(), and bm::sse2_and_arr_unal().
|
inline |
Reads block of 32-bit words from the decoding buffer and ORs to the destination.
| w | - pointer on memory block to read into |
| count | - should match bm::set_block_size |
Definition at line 844 of file encoding.h.
References bm::avx2_or_arr_unal(), BMNOEXCEPT, bm::decoder_base::buf_, get_32(), bm::decoder_base::seek(), and bm::sse2_or_arr_unal().
|
inline |
Reads 64-bit word from the decoding buffer.
Definition at line 769 of file encoding.h.
References BMNOEXCEPT, and bm::decoder_base::buf_.
Referenced by bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().
|
inline |
Reads 64-bit word from the decoding buffer.
Definition at line 786 of file encoding.h.
References BMNOEXCEPT, bm::decoder_base::buf_, and bm::encoder::memcpy().
Referenced by bm::compressed_collection_deserializer< CBC >::deserialize(), bm::sparse_vector_deserializer< SV >::load_header(), bm::sparse_vector_deserializer< SV >::load_planes_off_table(), bm::sparse_vector_deserializer< SV >::load_remap(), and bm::deseriaizer_base< DEC, BLOCK_IDX >::try_skip().