toZstdLevel
Map CompressionLevel / numericLevel to a zstd compression level.
When opts.numericLevel >= 0, the numeric value is used directly as the zstd level (valid range: 0 to ZSTD_maxCLevel(), typically 22). Negative numericLevel values are treated as "not set" because the default sentinel is -1.
Parameters
opts | Compression options to extract the level from. |
Returns
The integer zstd compression level.