Repository navigation
feat: advertise zstd and lz4 compression in protocol negotiation - #2978
Merged
Merged
Conversation
Forward zstd and lz4 feature flags to the protocol crate from core, engine, and transfer - matching the existing pattern for zlib-ng. Without this, supported_compressions() in the protocol negotiation never included zstd or lz4 because the feature gates were never activated on the protocol crate, even though the workspace defaults enabled them.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Forward zstd and lz4 feature flags to the protocol crate from core, engine, and transfer - matching the existing pattern for zlib-ng. Without this, supported_compressions() in the protocol negotiation never included zstd or lz4 because the feature gates were never activated on the protocol crate, even though the workspace defaults enabled them.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Forward zstd and lz4 feature flags to the protocol crate from core, engine, and transfer - matching the existing pattern for zlib-ng. Without this, supported_compressions() in the protocol negotiation never included zstd or lz4 because the feature gates were never activated on the protocol crate, even though the workspace defaults enabled them.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Details
The protocol crate's supported_compressions() function uses cfg(feature = zstd) and cfg(feature = lz4) guards to include these algorithms in the advertised list during capability negotiation. However, no upstream crate (core, transfer, engine) was forwarding these features to the protocol crate, so the guards were always false even when the workspace had both features enabled by default.
The CompressionAlgorithm enum variants, parse()/as_str() methods, to_compress_algorithm() conversion, and all negotiation tests were already in place - only the Cargo feature wiring was missing.
Test plan