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


Public Member Functions | |
| decoder (const unsigned char *buf) | |
| Construction. More... | |
| bm::short_t | get_16 () |
| Reads 16-bit word from the decoding buffer. More... | |
| bm::word_t | get_32 () |
| Reads 32-bit word from the decoding buffer. More... | |
| bm::id64_t | get_64 () |
| Reads 64-bit word from the decoding buffer. More... | |
| void | get_32 (bm::word_t *w, unsigned count) |
| Reads block of 32-bit words from the decoding buffer. More... | |
| bool | get_32_OR (bm::word_t *w, unsigned count) |
| Reads block of 32-bit words from the decoding buffer and ORs to the destination. More... | |
| void | get_32_AND (bm::word_t *w, unsigned count) |
| Reads block of 32-bit words from the decoding buffer and ANDs to the destination. More... | |
| void | get_16 (bm::short_t *s, unsigned count) |
| Reads block of 32-bit words from the decoding buffer. More... | |
Public Member Functions inherited from bm::decoder_base | |
| decoder_base (const unsigned char *buf) | |
| unsigned char | get_8 () |
| Reads character from the decoding buffer. More... | |
| size_t | size () const |
| Returns size of the current decoding stream. More... | |
| void | seek (int delta) |
| change current position More... | |
| void | memcpy (unsigned char *dst, size_t count) |
| read bytes from the decode buffer More... | |
| const unsigned char * | get_pos () const |
| Return current buffer pointer. More... | |
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 112 of file encoding.h.
|
inline |
Construction.
| buf | - pointer to the decoding memory. |
Definition at line 585 of file encoding.h.
| BMFORCEINLINE bm::short_t bm::decoder::get_16 | ( | ) |
Reads 16-bit word from the decoding buffer.
Definition at line 594 of file encoding.h.
References bm::decoder_base::buf_, and bm::decoder_base::memcpy().
Referenced by bm::deserializer< typename SV::bvector_type, bm::decoder >::decode_bit_block(), bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize(), bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize_gap(), bm::deseriaizer_base< bm::decoder >::read_0runs_block(), bm::deseriaizer_base< bm::decoder >::read_bic_arr(), bm::deseriaizer_base< bm::decoder >::read_bic_gap(), bm::deseriaizer_base< bm::decoder >::read_gap_block(), and bm::deseriaizer_base< bm::decoder >::read_id_list().
|
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 765 of file encoding.h.
References bm::decoder_base::buf_, bm::decoder_base::memcpy(), and bm::decoder_base::seek().
| BMFORCEINLINE bm::word_t bm::decoder::get_32 | ( | ) |
Reads 32-bit word from the decoding buffer.
Definition at line 610 of file encoding.h.
References bm::decoder_base::buf_, and bm::decoder_base::memcpy().
Referenced by bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize(), bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize_gap(), get_32_AND(), get_32_OR(), bm::deseriaizer_base< bm::decoder >::read_0runs_block(), and bm::deseriaizer_base< bm::decoder >::read_digest0_block().
|
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 654 of file encoding.h.
References bm::decoder_base::buf_, bm::decoder_base::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 727 of file encoding.h.
References 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 686 of file encoding.h.
References 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 628 of file encoding.h.
References bm::decoder_base::buf_, and bm::decoder_base::memcpy().
Referenced by bm::sparse_vector_deserializer< SV >::deserialize(), bm::compressed_collection_deserializer< CBC >::deserialize(), bm::deserializer< typename SV::bvector_type, bm::decoder >::deserialize(), and bm::deseriaizer_base< bm::decoder >::read_digest0_block().
1.8.13