Feature: Compression algorithm negotiation (not just zstd) #184
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?
Corresponding rsync flags/behavior:
--compress-choice=zstd|zlib|lz4and--zc/--compress-levelCurrent FastSync behavior:
FastSync only supports zstd. The client unilaterally sets
use_compressionandcompression_level, and the server must accept zstd. If a future peer does not support zstd, the connection cannot proceed.Proposed changes:
--compress-choice=<algo>(or--zc), keep-c/--compressas shortcut for zstd defaultCompressionAlgorithm compression_algorithmand existingcompression_levelnone,zstd(default), optionallylz4andzlibSTATUS_NEGOTIATEstepdata_compress/data_decompressdispatch based on negotiated algorithmPriority: low
Rationale: zstd is excellent, but supporting lz4 (faster, lower CPU) and zlib (broader compatibility) gives users more trade-offs. Negotiation is also needed for protocol extensibility.
Acceptance criteria:
--compress-choice=nonedisables compression even when-cis used--statsoutput