|
datasketches-cpp
|
serde for std::string items. More...
#include <serde.hpp>
Public Member Functions | |
| void | serialize (std::ostream &os, const std::string *items, unsigned num) const |
| Stream serialization. | |
| void | deserialize (std::istream &is, std::string *items, unsigned num) const |
| Stream deserialization. | |
| size_t | serialize (void *ptr, size_t capacity, const std::string *items, unsigned num) const |
| Raw bytes serialization. | |
| size_t | deserialize (const void *ptr, size_t capacity, std::string *items, unsigned num) const |
| Raw bytes deserialization. | |
| size_t | size_of_item (const std::string &item) const |
| Size of the given item. | |
serde for std::string items.
This should produce sketches binary-compatible with ItemsSketch<String> with ArrayOfStringsSerDe in Java. The length of each string is stored as a 32-bit integer (historically), which may be too wasteful. Treat this as an example.
|
inline |
Stream serialization.
| os | output stream |
| items | pointer to array of items |
| num | number of items |
|
inline |
Stream deserialization.
| is | input stream |
| items | pointer to array of items (items in the array are allocated but not initialized) |
| num | number of items |
|
inline |
Raw bytes serialization.
| ptr | pointer to output buffer |
| capacity | size of the buffer in bytes |
| items | pointer to array of items |
| num | number of items |
|
inline |
Raw bytes deserialization.
| ptr | pointer to input buffer |
| capacity | size of the buffer in bytes |
| items | pointer to array of items (items in the array are allocated but not initialized) |
| num | number of items |
|
inline |
Size of the given item.
| item | to be sized |