data_compress() ignores compression_level parameter — always uses zstd default (3) #48
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
In
src/shared/compression.cline 10, thedata_compress()function casts thecompression_levelparameter to void:This means that regardless of what the user specifies via
-c 10or--archive, the zstd compression context is never configured withZSTD_CCtx_setParameter()for the compression level. The default zstd level (3) is always used.Impact
Users requesting lower compression (faster) or higher compression (smaller files) do not get the expected behavior. For example,
-c 1(fastest) and-c 22(slowest, best ratio) would produce identical results.Location
src/shared/compression.c:9-43Suggested Fix
After creating the ZSTD compression context, add:
Also consider clamping
compression_levelto valid range (1–22) and validating it earlier in the CLI parsing.Severity
Critical
Category
Bug
This issue was automatically generated by the issue-creator agent.