| 138 | } // namespace helper |
| 139 | |
| 140 | inline uint32_t index(const std::array<int8_t, 256>& rdata, char symbol) { |
| 141 | auto index = rdata[static_cast<unsigned char>(symbol)]; |
| 142 | if (index <= -1) { throw std::runtime_error("Invalid input: not within alphabet"); } |
| 143 | return static_cast<uint32_t>(index); |
| 144 | } |
| 145 | } // namespace alphabet |
| 146 | |
| 147 | /** |