* parseLegacyParameters() : * reads legacy dictionary builder parameters from *stringPtr (e.g. "--train-legacy=selectivity=8") into *selectivity * @return 1 means that legacy dictionary builder parameters were correct * @return 0 in case of malformed parameters */
| 470 | * @return 0 in case of malformed parameters |
| 471 | */ |
| 472 | static unsigned parseLegacyParameters(const char* stringPtr, unsigned* selectivity) |
| 473 | { |
| 474 | if (!longCommandWArg(&stringPtr, "s=") && !longCommandWArg(&stringPtr, "selectivity=")) { return 0; } |
| 475 | *selectivity = readU32FromChar(&stringPtr); |
| 476 | if (stringPtr[0] != 0) return 0; |
| 477 | DISPLAYLEVEL(4, "legacy: selectivity=%u\n", *selectivity); |
| 478 | return 1; |
| 479 | } |
| 480 | |
| 481 | static ZDICT_cover_params_t defaultCoverParams(void) |
| 482 | { |
no test coverage detected