Skip to content

Finish async zlib streams before sending Wiiload frames - #2

Closed
communism420 wants to merge 1 commit into
mq1:mainfrom
communism420:codex/wiiload-transfer-regressions
Closed

communism420 wants to merge 1 commit into
mq1:mainfrom
communism420:codex/wiiload-transfer-regressions

Conversation

@communism420

Copy link
Copy Markdown

compress_then_send_async in 0.6.0 flushes the zlib encoder without finishing the stream. A 4 KiB input reproduces an incomplete deflate stream at the receiver. Read the encoder to EOF before recording the sizes, then flush and rewind the supplied buffer. The public API is unchanged, and the caller's buffer is not closed.

Add six regression tests covering complete sync/async frames, filename write failures, and compressed payloads, including empty input and input larger than the transfer buffer. The filename-flush production fixes are already present in 0.6.0; this PR retains tests for that behavior.

Validation on Windows with Rust 1.99: six tests with all features, four with async, two without default features; strict Clippy for all features/targets and formatting. The async compression regression fails against current upstream and passes with this change. Validation uses protocol/decompression fixtures; no physical Wii was tested.

Prepared with AI assistance.

@mq1 mq1 closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants