5#ifndef ADA_SCHEME_INL_H
6#define ADA_SCHEME_INL_H
20 "ftp",
"wss",
"file",
" "};
26constexpr uint64_t
make_key(std::string_view sv) {
28 for (
size_t i = 0; i < sv.size(); i++)
29 val |= (uint64_t)(uint8_t)sv[i] << (i * 8);
49 uint64_t input = (uint8_t)p[0];
50 input |= ((uint64_t)(uint8_t)p[n > 1] << 8) & (0 - (uint64_t)(n > 1));
51 input |= ((uint64_t)(uint8_t)p[(n > 2) * 2] << 16) & (0 - (uint64_t)(n > 2));
52 input |= ((uint64_t)(uint8_t)p[(n > 3) * 3] << 24) & (0 - (uint64_t)(n > 3));
53 input |= ((uint64_t)(uint8_t)p[(n > 4) * 4] << 32) & (0 - (uint64_t)(n > 4));
86 int hash_value = (2 * scheme.size() + (
unsigned)(scheme[0])) & 7;
88 return (target[0] == scheme[0]) && (target.substr(1) == scheme.substr(1));
94 int hash_value = (2 *
scheme.size() + (
unsigned)(
scheme[0])) & 7;
96 if (
scheme.size() == target.size() &&
111 int hash_value = (2 *
scheme.size() + (
unsigned)(
scheme[0])) & 7;
113 if (
scheme.size() == target.size() &&
#define ada_really_inline
Includes the definitions for scheme specific entities.
constexpr std::string_view is_special_list[]
constexpr uint64_t scheme_keys[]
constexpr uint16_t special_ports[]
uint64_t branchless_load5(const char *p, size_t n)
constexpr uint64_t make_key(std::string_view sv)
URL scheme utilities and constants.
constexpr ada::scheme::type get_scheme_type(std::string_view scheme) noexcept
type
Enumeration of URL scheme types.
constexpr uint16_t get_special_port(std::string_view scheme) noexcept
URL scheme type definitions and utilities.