1 #ifndef IPFS_MB_PREFIXES_H_
2 #define IPFS_MB_PREFIXES_H_
4 #include <vocab/byte_view.h>
14 enum class Code : char {
26 Code CodeFromPrefix(
char c);
27 std::string_view GetName(Code);
29 using Decoder = std::vector<Byte> (*)(std::string_view);
30 using Encoder = std::string (*)(ByteView);
37 std::string_view
const name;
38 static Codec const* Get(Code);
41 std::string encode(Code, ByteView);
42 std::optional<std::vector<Byte>> decode(std::string_view mb_str);
Definition: multi_base.h:34