BitMagic-C++
Public Types | Public Member Functions
bm::compressed_collection_serializer< CBC > Class Template Reference

Seriaizer for compressed collections. More...

#include <bmsparsevec_serial.h>

Public Types

typedef CBC compressed_collection_type
 
typedef CBC::bvector_type bvector_type
 
typedef CBC::buffer_type buffer_type
 
typedef CBC::statistics statistics_type
 
typedef CBC::address_resolver_type address_resolver_type
 

Public Member Functions

void serialize (const CBC &buffer_coll, buffer_type &buf, bm::word_t *temp_block=0)
  More...
 

Detailed Description

template<class CBC>
class bm::compressed_collection_serializer< CBC >

Seriaizer for compressed collections.

Definition at line 555 of file bmsparsevec_serial.h.

Member Function Documentation

◆ serialize()

template<class CBC >
void bm::compressed_collection_serializer< CBC >::serialize ( const CBC &  buffer_coll,
buffer_type buf,
bm::word_t temp_block = 0 
)
\brief Serialize compressed collection into memory buffer

Serialization format:

 | MAGIC_HEADER | ADDRESS_BITVECTROR | LIST_OF_BUFFER_SIZES | BUFFER(s)

   MAGIC_HEADER:
   BYTE+BYTE: Magic-signature 'BM' or 'BC'
   BYTE : Byte order ( 0 - Big Endian, 1 - Little Endian)

   ADDRESS_BITVECTROR:
   INT64: address bit-vector size
   [memblock]: serialized address bit-vector

   LIST_OF_BUFFER_SIZES:
   INT64 - buffer sizes count
   INT32 - buffer size 0
   INT32 - buffer size 1
   ...

   BUFFERS:
   [memblock]: block0
   [memblock]: block1
   ...

Definition at line 626 of file bmsparsevec_serial.h.

References bm::globals< T >::byte_order(), bm::serializer< BV >::gap_length_serialization(), bm::encoder::get_pos(), bm::encoder::memcpy(), bm::encoder::put_64(), bm::encoder::put_8(), bm::serializer< BV >::serialize(), bm::encoder::set_pos(), and bm::encoder::size().


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