载入中...
搜索中...
未找到
eve::data 命名空间参考

命名空间

namespace  impl
 

class  ByteData
 In-memory byte buffer implementing eve::Data (ref-counted). 更多...
 
class  CompressedData
 Stores byte data compressed via DataModule::compress. 更多...
 
class  Compressor
 Base class for backends for different compression formats. 更多...
 
class  DataModule
 
class  DataView
 Contains a reference to a subsection of an existing Data object. 更多...
 
class  HashFunction
 
class  JsonDocument
 Thin RAII wrapper over a Poco JSON value (object/array/scalar). 更多...
 
class  LZ4Compressor
 
class  XmlDocument
 Thin RAII wrapper over a Poco XML DOM document. 更多...
 
class  zlibCompressor
 

枚举

enum  ContainerType { CONTAINER_DATA , CONTAINER_STRING , CONTAINER_MAX_ENUM }
 

函数

 Module_IMPL (DataModule, new DataModule())
 
CompressedDatacompress (std::string format, const char *rawbytes, size_t rawsize, int level=-1)
 Compresses a block of memory using the given compression format.
 
char * decompress (CompressedData *data, size_t &decompressedsize)
 Decompresses existing compressed data into raw bytes.
 
char * decompress (std::string format, const char *cbytes, size_t compressedsize, size_t &rawsize)
 Decompresses existing compressed data into raw bytes.
 
char * encode (std::string format, const char *src, size_t srclen, size_t &dstlen, size_t linelen)
 
char * decode (std::string format, const char *src, size_t srclen, size_t &dstlen)
 
std::string hash (std::string function, Data *input)
 Hash the input, producing an set of bytes as output.
 
std::string hash (std::string function, const char *input, uint64_t size)
 
void hash (std::string function, Data *input, HashFunction::Value &output)
 
void hash (std::string function, const char *input, uint64_t size, HashFunction::Value &output)
 

枚举类型说明

◆ ContainerType

枚举值
CONTAINER_DATA 
CONTAINER_STRING 
CONTAINER_MAX_ENUM 

在文件 DataModule.h20 行定义.

函数说明

◆ compress()

CompressedData * eve::data::compress ( std::string  format,
const char *  rawbytes,
size_t  rawsize,
int  level = -1 
)

Compresses a block of memory using the given compression format.

参数
formatThe compression format to use.
rawbytesThe data to compress.
rawsizeThe size in bytes of the data to compress.
levelThe amount of compression to apply (between 0 and 9.) A value of -1 indicates the default amount of compression. Specific formats may not use every level.
返回
The newly compressed data.

在文件 DataModule.cpp158 行定义.

引用了 eve::data::Compressor::compress(), data , 以及 eve::data::Compressor::getCompressor().

◆ decode()

char * eve::data::decode ( std::string  format,
const char *  src,
size_t  srclen,
size_t &  dstlen 
)

在文件 DataModule.cpp212 行定义.

引用了 eve::b64_decode().

◆ decompress() [1/2]

char * eve::data::decompress ( CompressedData data,
size_t &  decompressedsize 
)

Decompresses existing compressed data into raw bytes.

参数
[in]dataThe compressed data to decompress.
[out]decompressedsizeThe size in bytes of the decompressed data.
返回
The newly decompressed data (allocated with new[]).

在文件 DataModule.cpp183 行定义.

引用了 data , 以及 decompress().

被这些函数引用 decompress().

◆ decompress() [2/2]

char * eve::data::decompress ( std::string  format,
const char *  cbytes,
size_t  compressedsize,
size_t &  rawsize 
)

Decompresses existing compressed data into raw bytes.

参数
[in]formatThe compression format the data is in.
[in]cbytesThe compressed data to decompress.
[in]compressedsizeThe size in bytes of the compressed data.
[in,out]rawsizeOn input, the size in bytes of the original uncompressed data, or 0 if unknown. On return, the size in bytes of the newly decompressed data.
返回
The newly decompressed data (allocated with new[]).

在文件 DataModule.cpp194 行定义.

引用了 eve::data::Compressor::decompress() , 以及 eve::data::Compressor::getCompressor().

◆ encode()

char * eve::data::encode ( std::string  format,
const char *  src,
size_t  srclen,
size_t &  dstlen,
size_t  linelen 
)

在文件 DataModule.cpp204 行定义.

引用了 eve::b64_encode().

◆ hash() [1/4]

std::string eve::data::hash ( std::string  function,
const char *  input,
uint64_t  size 
)

◆ hash() [2/4]

void eve::data::hash ( std::string  function,
const char *  input,
uint64_t  size,
HashFunction::Value output 
)

◆ hash() [3/4]

std::string eve::data::hash ( std::string  function,
Data input 
)

Hash the input, producing an set of bytes as output.

参数
[in]functionThe selected hash function.
[in]inputThe input data to hash.
返回
An std::string of bytes, representing the result of the hash function.

在文件 DataModule.cpp220 行定义.

引用了 eve::Data::getData(), eve::Data::getSize() , 以及 hash().

被这些函数引用 hash(), hash() , 以及 hash().

◆ hash() [4/4]

void eve::data::hash ( std::string  function,
Data input,
HashFunction::Value output 
)

在文件 DataModule.cpp232 行定义.

引用了 eve::Data::getData(), eve::Data::getSize() , 以及 hash().

◆ Module_IMPL()

eve::data::Module_IMPL ( DataModule  ,
new   DataModule() 
)