20 virtual int_type
overflow(int_type c)
override;
35 const std::string &
ToString() {
return _buf._string; }
47 struct MemBuf : std::streambuf {
48 MemBuf(
char *buf,
size_t size) { this->setg(buf, buf, buf + size); }
51 static void Base16Decode(
const std::string &in,
char *out);
53 std::unique_ptr<char> _data;
Creates a raw std istream from a base16 encoded string.
Base16DecoderStream(const std::string &s)
A custom std stream buffer that saves data piped through it into a base16 encoded string.
virtual int_type overflow(int_type c) override
An implementation similar to std::stringstream which results in a base16 encoded string.
const std::string & ToString()