1#ifndef HHC_CONSTANTS_HPP
2#define HHC_CONSTANTS_HPP
9 constexpr uint32_t
BASE = 66;
11 '-',
'.',
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
12 'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
13 'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
14 'Y',
'Z',
'_',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
15 'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
16 'v',
'w',
'x',
'y',
'z',
'~'
30 std::array<uint8_t, 256> inverse_alphabet{};
31 for (
auto& entry : inverse_alphabet) {
34 for (uint32_t i = 0; i <
BASE; i++) {
35 inverse_alphabet[
static_cast<unsigned char>(
ALPHABET[i])] =
static_cast<uint8_t
>(i);
37 return inverse_alphabet;
constexpr auto HHC_64BIT_ENCODED_MAX_STRING
Definition hhc_constants.hpp:47
constexpr size_t HHC_64BIT_STRING_LENGTH
Definition hhc_constants.hpp:43
constexpr size_t HHC_32BIT_ENCODED_LENGTH
Definition hhc_constants.hpp:44
constexpr uint32_t BITS_PER_BYTE
Definition hhc_constants.hpp:41
constexpr auto HHC_32BIT_ENCODED_MAX_STRING
Definition hhc_constants.hpp:46
constexpr std::array< uint8_t, 256 > make_hhc_inverse_alphabet()
Definition hhc_constants.hpp:29
constexpr size_t HHC_32BIT_STRING_LENGTH
Definition hhc_constants.hpp:42
constexpr uint8_t HHC_INVALID_CHAR
Definition hhc_constants.hpp:20
constexpr std::array< char, BASE > ALPHABET
Definition hhc_constants.hpp:10
constexpr size_t HHC_64BIT_ENCODED_LENGTH
Definition hhc_constants.hpp:45
constexpr auto INVERSE_ALPHABET
Definition hhc_constants.hpp:39
constexpr uint32_t BASE
Definition hhc_constants.hpp:9