| 926 | |
| 927 | template <typename DType> |
| 928 | void TypedStatisticsImpl<DType>::PlainEncode(const T& src, std::string* dst) const { |
| 929 | auto encoder = MakeTypedEncoder<DType>(Encoding::PLAIN, false, descr_, pool_); |
| 930 | encoder->Put(&src, 1); |
| 931 | auto buffer = encoder->FlushValues(); |
| 932 | auto ptr = reinterpret_cast<const char*>(buffer->data()); |
| 933 | dst->assign(ptr, static_cast<size_t>(buffer->size())); |
| 934 | } |
| 935 | |
| 936 | template <typename DType> |
| 937 | void TypedStatisticsImpl<DType>::PlainDecode(const std::string& src, T* dst) const { |