Files
Sebastiaan van Stijn fcb7e529c2 util/compression: use zstd.EncoderLevelFromZstd to map compression levels
The toZstdEncoderLevel utility was introduced in cab33b1e31,
and has a custom mapping of zstd compressions levels to their go (klauspost/compress)
counterparts.

Swap our local implementation for the one in klauspost/compress so that new levels
implemented in klauspost/compress will also be mapped if they arrive.

This does change some mappings;

| Input level | Before                 | After                    |
|-------------|------------------------|--------------------------|
| `< 0`       | `SpeedDefault`         | `SpeedFastest`           |
| `6`         | `SpeedDefault`         | `SpeedBetterCompression` |
| `9`         | `SpeedBestCompression` | `SpeedBetterCompression` |

While updating, also slightly refactor;

- use an options slice to skip setting the option if no config was set, and
  to allow adding additional options.
- inline zstdWriter where used, as it was only used in a single place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-07 19:55:33 +02:00
..
2025-01-13 16:42:48 -08:00
2025-01-13 16:42:48 -08:00
2024-11-21 10:58:27 +03:00
2025-01-13 16:42:48 -08:00