#include "coding/reader.hpp" #include "coding/memory_region.hpp" std::unique_ptr Reader::GetMemoryRegion(uint64_t pos, size_t size) const { std::vector buffer(size); Read(pos, buffer.data(), size); return std::make_unique(std::move(buffer)); } void Reader::ReadAsString(std::string & s) const { s.clear(); s.resize(static_cast(Size())); Read(0 /* pos */, s.data(), s.size()); }