* @brief Test if a string ends with a given suffix. */
| 228 | * @brief Test if a string ends with a given suffix. |
| 229 | */ |
| 230 | static bool ends_with( |
| 231 | const std::string& str, |
| 232 | const std::string& suffix |
| 233 | ) { |
| 234 | return (str.size() >= suffix.size()) && |
| 235 | (0 == str.compare(str.size() - suffix.size(), suffix.size(), suffix)); |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * @brief Runner callback function for a compression worker thread. |