命名空间 | |
| 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()) | |
| CompressedData * | compress (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.h 第 20 行定义.
函数说明
◆ 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.
- 参数
-
format The compression format to use. rawbytes The data to compress. rawsize The size in bytes of the data to compress. level The 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.cpp 第 158 行定义.
引用了 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.cpp 第 212 行定义.
引用了 eve::b64_decode().
◆ decompress() [1/2]
| char * eve::data::decompress | ( | CompressedData * | data, |
| size_t & | decompressedsize | ||
| ) |
Decompresses existing compressed data into raw bytes.
- 参数
-
[in] data The compressed data to decompress. [out] decompressedsize The size in bytes of the decompressed data.
- 返回
- The newly decompressed data (allocated with new[]).
在文件 DataModule.cpp 第 183 行定义.
引用了 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] format The compression format the data is in. [in] cbytes The compressed data to decompress. [in] compressedsize The size in bytes of the compressed data. [in,out] rawsize On 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.cpp 第 194 行定义.
引用了 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.cpp 第 204 行定义.
引用了 eve::b64_encode().
◆ hash() [1/4]
| std::string eve::data::hash | ( | std::string | function, |
| const char * | input, | ||
| uint64_t | size | ||
| ) |
在文件 DataModule.cpp 第 225 行定义.
引用了 eve::data::HashFunction::Value::data, hash() , 以及 eve::data::HashFunction::Value::size.
◆ hash() [2/4]
| void eve::data::hash | ( | std::string | function, |
| const char * | input, | ||
| uint64_t | size, | ||
| HashFunction::Value & | output | ||
| ) |
在文件 DataModule.cpp 第 237 行定义.
引用了 eve::data::HashFunction::getHashFunction() , 以及 eve::data::HashFunction::hash().
◆ hash() [3/4]
| std::string eve::data::hash | ( | std::string | function, |
| Data * | input | ||
| ) |
Hash the input, producing an set of bytes as output.
- 参数
-
[in] function The selected hash function. [in] input The input data to hash.
- 返回
- An std::string of bytes, representing the result of the hash function.
在文件 DataModule.cpp 第 220 行定义.
引用了 eve::Data::getData(), eve::Data::getSize() , 以及 hash().
◆ hash() [4/4]
| void eve::data::hash | ( | std::string | function, |
| Data * | input, | ||
| HashFunction::Value & | output | ||
| ) |
在文件 DataModule.cpp 第 232 行定义.
引用了 eve::Data::getData(), eve::Data::getSize() , 以及 hash().
◆ Module_IMPL()
| eve::data::Module_IMPL | ( | DataModule | , |
| new | DataModule() | ||
| ) |