* @brief Configures the frame start delimiters and precomputes their KMP tables. */
| 222 | * @brief Configures the frame start delimiters and precomputes their KMP tables. |
| 223 | */ |
| 224 | void IO::FrameReader::setStartSequences(const QList<QByteArray>& starts) |
| 225 | { |
| 226 | m_startSequences.clear(); |
| 227 | m_startSequenceLps.clear(); |
| 228 | |
| 229 | for (const auto& s : starts) { |
| 230 | if (s.isEmpty()) |
| 231 | continue; |
| 232 | |
| 233 | m_startSequences.append(s); |
| 234 | m_startSequenceLps.append(m_circularBuffer.buildKMPTable(s)); |
| 235 | } |
| 236 | |
| 237 | Q_ASSERT(m_startSequences.size() == m_startSequenceLps.size()); |
| 238 | } |
| 239 | |
| 240 | /** |
| 241 | * @brief Configures the frame end delimiters and precomputes their KMP tables. |
no test coverage detected