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 <cstdint>
6#include <span>
7#include <string>
8#include <string_view>
9#include <utility>
10
11namespace HexDump {
12 [[nodiscard]] std::string encode(std::span<const uint8_t> input, bool newlines = true);
13 [[nodiscard]] std::pair<openmsx::MemBuffer<uint8_t>, size_t> decode(std::string_view input);
14 [[nodiscard]] bool decode_inplace(std::string_view input, std::span<uint8_t> output);
15}
16
17#endif
std::string encode(std::span< const uint8_t > input)
Definition: Base64.cc:40
std::pair< MemBuffer< uint8_t >, size_t > decode(std::string_view input)
Definition: Base64.cc:88
bool decode_inplace(std::string_view input, std::span< uint8_t > output)
Definition: HexDump.cc:73