| 62 | } |
| 63 | |
| 64 | static void appendString(BinaryData& out, std::string_view str) |
| 65 | { |
| 66 | if (str.size() < 32) |
| 67 | out.push_back(SHORT_STRING_FLAG | char(str.size())); |
| 68 | else |
| 69 | { |
| 70 | appendType(out, SerializedType::LONG_STRING); |
| 71 | appendValue<uint32_t>(out, static_cast<uint32_t>(str.size())); |
| 72 | } |
| 73 | out.append(str.data(), str.size()); |
| 74 | } |
| 75 | |
| 76 | static void appendData(BinaryData& out, const void* data, size_t dataSize) |
| 77 | { |
no test coverage detected