Electroneum
epee::StorageNamed::gziped_storage< t_base_storage > Class Template Reference

#include <gzipped_inmemstorage.h>

Inheritance diagram for epee::StorageNamed::gziped_storage< t_base_storage >:
Collaboration diagram for epee::StorageNamed::gziped_storage< t_base_storage >:

Public Member Functions

size_t PackToSolidBuffer (std::string &targetObj)
 
size_t LoadFromSolidBuffer (const std::string &pTargetObj)
 

Detailed Description

template<class t_base_storage>
class epee::StorageNamed::gziped_storage< t_base_storage >

Definition at line 38 of file gzipped_inmemstorage.h.

Member Function Documentation

◆ LoadFromSolidBuffer()

template<class t_base_storage >
size_t epee::StorageNamed::gziped_storage< t_base_storage >::LoadFromSolidBuffer ( const std::string &  pTargetObj)
inline

Definition at line 53 of file gzipped_inmemstorage.h.

54  {
55  std::string buff_to_ungzip = pTargetObj;
56  if(zlib_helper::unpack(buff_to_ungzip))
57  return t_base_storage::LoadFromSolidBuffer(buff_to_ungzip);
58 
59  return 0;
60  }
::std::string string
Definition: gtest-port.h:1097
bool unpack(std::string &target)
Definition: zlib_helper.h:70
Here is the call graph for this function:

◆ PackToSolidBuffer()

template<class t_base_storage >
size_t epee::StorageNamed::gziped_storage< t_base_storage >::PackToSolidBuffer ( std::string &  targetObj)
inline

Definition at line 41 of file gzipped_inmemstorage.h.

42  {
43  size_t res = t_base_storage::PackToSolidBuffer(targetObj);
44  if(res <= 0)
45  return res;
46 
47  if(!zlib_helper::pack(targetObj))
48  return 0;
49 
50  return targetObj.size();
51  }
const char * res
Definition: hmac_keccak.cpp:41
bool pack(std::string &target)
Definition: zlib_helper.h:39
Here is the call graph for this function:

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