XMA: read a cursor's bits a byte's worth at a time #1258
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1258"
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?
Imported from Marvisak/VIctory. Originally posted by Jitheswar on 2026-11-24T16:51:14Z.
Rebased onto
940d32f. #1016 (merged) now gathers a frame's payload bytes directly inside a packet, which covers most of what this PR first did. What's left:Cursor::bits, still used for the length fields, the bytes that straddle a packet edge, and the tail, read one bit at a time. It now takes as many bits from each source byte as it can, still skipping the header and other streams' packets at each packet edge.Test: a 29-bit frame whose first 1-16 bits end packet 0 (packet 1 is another stream's) reads back with its tail padding, and is refused one byte short. #1016's noise tests pass unchanged on top of this.
cargo test -p victory-formats39 passed;cargo clippy -p victory-formats --all-targets -D warningsclean (Linux). No game data.AI-assisted (Claude Code, Codex).
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T16:56:47Z.
Review: APPROVED
Tested head
4c748c6(fast-forward onmainffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC):cargo test -p victory-formats: 24 passed, 0 failed, 4 ignored (includingxma::tests::frame_bytes_cross_an_interleaved_packet_boundary)cargo clippy -p victory-formats --all-targets: 0 warningscargo xtask policy: okClean byte-chunked XMA frame gathering with regression coverage across packet boundaries. Approving.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:35:50Z.
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1016. Same optimisation as #1016 (gather XMA frame bits in byte-sized chunks); also correct, but smaller gain and it removes Cursor::bit.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
[PR #1258] Gather XMA frames in byte-sized chunksto [PR #1258] XMA: read a cursor's bits a byte's worth at a timePull request closed