|
| 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.
This implementation treats std::string as an arbitrary byte container. It does not check whether string contents are valid UTF-8.
Use a UTF-8-validating SerDe when cross-language portability is required.