|
K-HHC
C++ Header-only Library for Hexahexacontadecimal Encoding/Decoding
|
Namespaces | |
| namespace | detail |
Functions | |
| constexpr void | hhc_32bit_encode_padded (uint32_t input, char *output_string) |
| Encode a 32-bit integer into a 6-character string. | |
| constexpr void | hhc_unpad_string (char *output_string) |
| Unpad a string by removing the leading '-' padding characters and moving the significant content to the beginning. | |
| constexpr void | hhc_32bit_encode_unpadded (uint32_t input, char *output_string) |
| Encode a 32-bit integer into a 6-character string without padding. | |
| constexpr uint32_t | hhc_32bit_decode_unsafe (const char *input_string) |
| Decode a 32-bit integer from a 6-character string. | |
| constexpr void | hhc_64bit_encode_padded (uint64_t input, char *output_string) |
| Encode a 64-bit integer into a 11-character string. | |
| constexpr void | hhc_64bit_encode_unpadded (uint64_t input, char *output_string) |
| Encode a 64-bit integer into a 11-character string without padding. | |
| constexpr uint64_t | hhc_64bit_decode_unsafe (const char *input_string) |
| Decode a 64-bit integer from a 11-character string. | |
| constexpr std::size_t | hhc_validate_string (const char *input_string) |
| Validate a string to ensure it is a valid HHC string. | |
| constexpr bool | hhc_bounds_check (const char *input_string, const char *max_string) |
| Check if a string is within the bounds of a maximum string. | |
| constexpr uint32_t | hhc_32bit_decode (const char *input_string) |
| Decode a 32-bit integer from a 6-character string. | |
| constexpr uint64_t | hhc_64bit_decode (const char *input_string) |
| Decode a 64-bit integer from a 11-character string. | |
| constexpr std::array< uint8_t, 256 > | make_hhc_inverse_alphabet () |
Variables | |
| constexpr uint32_t | BASE = 66 |
| constexpr std::array< char, BASE > | ALPHABET |
| constexpr uint8_t | HHC_INVALID_CHAR = 0xFF |
| constexpr auto | INVERSE_ALPHABET = make_hhc_inverse_alphabet() |
| constexpr uint32_t | BITS_PER_BYTE = 8 |
| constexpr size_t | HHC_32BIT_STRING_LENGTH = 8 |
| constexpr size_t | HHC_64BIT_STRING_LENGTH = 16 |
| constexpr size_t | HHC_32BIT_ENCODED_LENGTH = 6 |
| constexpr size_t | HHC_64BIT_ENCODED_LENGTH = 11 |
| constexpr auto | HHC_32BIT_ENCODED_MAX_STRING = "1QLCp1" |
| constexpr auto | HHC_64BIT_ENCODED_MAX_STRING = "9lH9ebONzYD" |
|
constexpr |
Decode a 32-bit integer from a 6-character string.
| input_string | The input string to decode |
| std::invalid_argument | if the string is invalid |
| std::out_of_range | if the string exceeds 32-bit bounds |

|
constexpr |
Decode a 32-bit integer from a 6-character string.
| input_string | The input string to decode (must be at least HHC_32BIT_ENCODED_LENGTH bytes) |

|
constexpr |
Encode a 32-bit integer into a 6-character string.
| input | The 32-bit integer to encode |
| output_string | The output string to write the encoded result to |

|
constexpr |
Encode a 32-bit integer into a 6-character string without padding.
| input | The 32-bit integer to encode |
| output_string | The output string to write the encoded result to (must be at least HHC_32BIT_STRING_LENGTH bytes and null-terminated) |

|
constexpr |
Decode a 64-bit integer from a 11-character string.
| input_string | The input string to decode |
| std::invalid_argument | if the string is invalid |
| std::out_of_range | if the string exceeds 64-bit bounds |

|
constexpr |
Decode a 64-bit integer from a 11-character string.
| input_string | The input string to decode (must be at least HHC_64BIT_ENCODED_LENGTH bytes) |

|
constexpr |
Encode a 64-bit integer into a 11-character string.
| input | The 64-bit integer to encode |
| output_string | The output string to write the encoded result to |

|
constexpr |
Encode a 64-bit integer into a 11-character string without padding.
| input | The 64-bit integer to encode |
| output_string | The output string to write the encoded result to (must be at least HHC_64BIT_STRING_LENGTH bytes and null-terminated) |

|
constexpr |
Check if a string is within the bounds of a maximum string.
| input_string | The input string to check |
| max_string | The maximum string to check against |

|
constexpr |
Unpad a string by removing the leading '-' padding characters and moving the significant content to the beginning.
| output_string | The output string to unpad (must be null-terminated) |

|
constexpr |
Validate a string to ensure it is a valid HHC string.
| input_string | The input string to validate |

|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |