| 958 | |
| 959 | template <typename DType> |
| 960 | void TypedStatisticsImpl<DType>::PlainEncode(const T& src, std::string* dst) const { |
| 961 | auto encoder = MakeTypedEncoder<DType>(Encoding::PLAIN, false, descr_, pool_); |
| 962 | encoder->Put(&src, 1); |
| 963 | auto buffer = encoder->FlushValues(); |
| 964 | auto ptr = reinterpret_cast<const char*>(buffer->data()); |
| 965 | dst->assign(ptr, static_cast<size_t>(buffer->size())); |
| 966 | } |
| 967 | |
| 968 | template <typename DType> |
| 969 | void TypedStatisticsImpl<DType>::PlainDecode(const std::string& src, T* dst) const { |