mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-08-03 09:32:17 +00:00
Fix: narrow zstd compression level to the conventional -22..22 range
The raw library bounds (-131072, 22) come from an internal zstd implementation constant (-ZSTD_TARGETLENGTH_MAX), not a meaningful distinct level — deeper negative values than -22 buy nothing over -22 in practice, and the zstd CLI/community convention only uses -22..22. Exposing the raw range via --zip-compression-level would let a user pass a number like -50000 that "validates" but means nothing.
This commit is contained in:
@@ -338,7 +338,7 @@ value set in `-zn` or `--zip-name`.
|
||||
|
||||
The compression method for the zip can be set with `--zip-compression`
|
||||
(`stored`, `deflated` (default), `bzip2`, `lzma`, or `zstd`) and tuned with
|
||||
`--zip-compression-level` (deflated: 0–9, bzip2: 1–9, zstd: -131072–22; ignored
|
||||
`--zip-compression-level` (deflated: 0–9, bzip2: 1–9, zstd: -22–22; ignored
|
||||
for `stored` and `lzma`). Both options require `--zip`.
|
||||
|
||||
!!! warning
|
||||
|
||||
Reference in New Issue
Block a user