| 27 | } |
| 28 | |
| 29 | static bool deserialize(CodedInputStream& is, Value& value) noexcept { |
| 30 | const void* data; |
| 31 | int size; |
| 32 | value.clear(); |
| 33 | while (is.GetDirectBufferPointer(&data, &size)) { |
| 34 | value.append(reinterpret_cast<const char*>(data), |
| 35 | static_cast<size_t>(size)); |
| 36 | is.Skip(size); |
| 37 | } |
| 38 | return true; |
| 39 | } |
| 40 | |
| 41 | static size_t calculate_serialized_size(const Value& value) noexcept { |
| 42 | return value.size(); |