Repository navigation
feat: enable zstd compression auto-negotiation - #3081
Merged
Merged
Conversation
Advertise zstd in the compression capability string for protocol 30+ negotiation, matching upstream rsync 3.4.1's preference order (zstd > lz4 > zlibx > zlib > none). Zstd wire framing was validated in PR #1376. LZ4 remains gated pending wire framing fix (#1378). Remove oc:compress-zstd and up:compress-zstd from KNOWN_FAILURES.
2 tasks
oferchen
added a commit
that referenced
this pull request
Apr 5, 2026
Add zstd to the supported compression list advertised during vstring negotiation, gated on the `zstd` feature flag. When both peers support zstd, it is automatically selected as the preferred compression codec instead of falling back to zlibx/zlib. This mirrors upstream rsync's compat.c:100-112 where SUPPORT_ZSTD gates zstd in the preference list. The zstd per-token wire framing was validated in PR #3081, making it safe for auto-negotiation. Lz4 remains excluded until its wire format is interop-validated (task #1380). Graceful fallback to zlibx/zlib occurs when the remote peer does not advertise zstd support.
3 tasks
oferchen
added a commit
that referenced
this pull request
Apr 6, 2026
Add zstd to the supported compression list advertised during vstring negotiation, gated on the `zstd` feature flag. When both peers support zstd, it is automatically selected as the preferred compression codec instead of falling back to zlibx/zlib. This mirrors upstream rsync's compat.c:100-112 where SUPPORT_ZSTD gates zstd in the preference list. The zstd per-token wire framing was validated in PR #3081, making it safe for auto-negotiation. Lz4 remains excluded until its wire format is interop-validated (task #1380). Graceful fallback to zlibx/zlib occurs when the remote peer does not advertise zstd support.
oferchen
added a commit
that referenced
this pull request
Apr 6, 2026
Add zstd to the supported compression list advertised during vstring negotiation, gated on the `zstd` feature flag. When both peers support zstd, it is automatically selected as the preferred compression codec instead of falling back to zlibx/zlib. This mirrors upstream rsync's compat.c:100-112 where SUPPORT_ZSTD gates zstd in the preference list. The zstd per-token wire framing was validated in PR #3081, making it safe for auto-negotiation. Lz4 remains excluded until its wire format is interop-validated (task #1380). Graceful fallback to zlibx/zlib occurs when the remote peer does not advertise zstd support.
oferchen
added a commit
that referenced
this pull request
Apr 6, 2026
* feat: enable zstd compression auto-negotiation Add zstd to the supported compression list advertised during vstring negotiation, gated on the `zstd` feature flag. When both peers support zstd, it is automatically selected as the preferred compression codec instead of falling back to zlibx/zlib. This mirrors upstream rsync's compat.c:100-112 where SUPPORT_ZSTD gates zstd in the preference list. The zstd per-token wire framing was validated in PR #3081, making it safe for auto-negotiation. Lz4 remains excluded until its wire format is interop-validated (task #1380). Graceful fallback to zlibx/zlib occurs when the remote peer does not advertise zstd support. * fix: reuse sender-side CompressedTokenEncoder across files for zstd Create the CompressedTokenEncoder once at session level in run_transfer_loop() and pass it to per-file functions, matching upstream token.c's single compression context pattern. Previously each file created a new encoder (new ZSTD_CCtx), breaking zstd's continuous-stream contract where the receiver expects one DCtx for the entire session. upstream: token.c uses a single compression context across all files
oferchen
added a commit
that referenced
this pull request
Apr 11, 2026
Add a standalone interop test that validates zstd compression auto-negotiation against upstream rsync 3.4.1 (PR #3081). Tests both daemon push directions: upstream client to oc-rsync daemon and oc-rsync client to upstream daemon. Verifies transferred files match via byte comparison. Gated on upstream zstd support availability.
3 tasks
oferchen
added a commit
that referenced
this pull request
Apr 11, 2026
Add a standalone interop test that validates zstd compression auto-negotiation against upstream rsync 3.4.1 (PR #3081). Tests both daemon push directions: upstream client to oc-rsync daemon and oc-rsync client to upstream daemon. Verifies transferred files match via byte comparison. Gated on upstream zstd support availability.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Advertise zstd in the compression capability string for protocol 30+ negotiation, matching upstream rsync 3.4.1's preference order (zstd > lz4 > zlibx > zlib > none). Zstd wire framing was validated in PR #1376. LZ4 remains gated pending wire framing fix (#1378). Remove oc:compress-zstd and up:compress-zstd from KNOWN_FAILURES.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
* feat: enable zstd compression auto-negotiation Add zstd to the supported compression list advertised during vstring negotiation, gated on the `zstd` feature flag. When both peers support zstd, it is automatically selected as the preferred compression codec instead of falling back to zlibx/zlib. This mirrors upstream rsync's compat.c:100-112 where SUPPORT_ZSTD gates zstd in the preference list. The zstd per-token wire framing was validated in PR #3081, making it safe for auto-negotiation. Lz4 remains excluded until its wire format is interop-validated (task #1380). Graceful fallback to zlibx/zlib occurs when the remote peer does not advertise zstd support. * fix: reuse sender-side CompressedTokenEncoder across files for zstd Create the CompressedTokenEncoder once at session level in run_transfer_loop() and pass it to per-file functions, matching upstream token.c's single compression context pattern. Previously each file created a new encoder (new ZSTD_CCtx), breaking zstd's continuous-stream contract where the receiver expects one DCtx for the entire session. upstream: token.c uses a single compression context across all files
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Add a standalone interop test that validates zstd compression auto-negotiation against upstream rsync 3.4.1 (PR #3081). Tests both daemon push directions: upstream client to oc-rsync daemon and oc-rsync client to upstream daemon. Verifies transferred files match via byte comparison. Gated on upstream zstd support availability.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Advertise zstd in the compression capability string for protocol 30+ negotiation, matching upstream rsync 3.4.1's preference order (zstd > lz4 > zlibx > zlib > none). Zstd wire framing was validated in PR #1376. LZ4 remains gated pending wire framing fix (#1378). Remove oc:compress-zstd and up:compress-zstd from KNOWN_FAILURES.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
* feat: enable zstd compression auto-negotiation Add zstd to the supported compression list advertised during vstring negotiation, gated on the `zstd` feature flag. When both peers support zstd, it is automatically selected as the preferred compression codec instead of falling back to zlibx/zlib. This mirrors upstream rsync's compat.c:100-112 where SUPPORT_ZSTD gates zstd in the preference list. The zstd per-token wire framing was validated in PR #3081, making it safe for auto-negotiation. Lz4 remains excluded until its wire format is interop-validated (task #1380). Graceful fallback to zlibx/zlib occurs when the remote peer does not advertise zstd support. * fix: reuse sender-side CompressedTokenEncoder across files for zstd Create the CompressedTokenEncoder once at session level in run_transfer_loop() and pass it to per-file functions, matching upstream token.c's single compression context pattern. Previously each file created a new encoder (new ZSTD_CCtx), breaking zstd's continuous-stream contract where the receiver expects one DCtx for the entire session. upstream: token.c uses a single compression context across all files
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Add a standalone interop test that validates zstd compression auto-negotiation against upstream rsync 3.4.1 (PR #3081). Tests both daemon push directions: upstream client to oc-rsync daemon and oc-rsync client to upstream daemon. Verifies transferred files match via byte comparison. Gated on upstream zstd support availability.
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
oc:compress-zstdandup:compress-zstdfrom KNOWN_FAILURESChanges
algorithms.rs:supported_compressions()now includes "zstd" behind#[cfg(feature = "zstd")]run_interop.sh: Remove 2 zstd entries from KNOWN_FAILURESTest plan
compress-zstdtests pass in both directions