| 131 | } |
| 132 | |
| 133 | BufferPtr readBuffer(std::istream& in, memory::MemoryPool* pool) { |
| 134 | auto numBytes = read<int32_t>(in); |
| 135 | auto buffer = AlignedBuffer::allocate<char>(numBytes, pool); |
| 136 | auto rawBuffer = buffer->asMutable<char>(); |
| 137 | in.read(rawBuffer, numBytes); |
| 138 | return buffer; |
| 139 | } |
| 140 | |
| 141 | BufferPtr readOptionalBuffer(std::istream& in, memory::MemoryPool* pool) { |
| 142 | bool hasBuffer = read<bool>(in); |
no test coverage detected