openMSX
HexDump.hh
Go to the documentation of this file.
1 #ifndef HEXDUMP_HH
2 #define HEXDUMP_HH
3 
4 #include "MemBuffer.hh"
5 #include "string_view.hh"
6 #include <string>
7 #include <cstdint>
8 #include <utility>
9 
10 namespace HexDump {
11  std::string encode(const uint8_t* input, size_t len, bool newlines = true);
12  std::pair<openmsx::MemBuffer<uint8_t>, size_t> decode(string_view input);
13  bool decode_inplace(string_view input, uint8_t* output, size_t outSize);
14 }
15 
16 #endif
string encode(const uint8_t *input, size_t inSize)
Definition: Base64.cc:38
bool decode_inplace(string_view input, uint8_t *output, size_t outSize)
Definition: HexDump.cc:72
std::pair< MemBuffer< uint8_t >, size_t > decode(string_view input)
Definition: Base64.cc:88
This class implements a (close approximation) of the std::string_view class.
Definition: string_view.hh:16