Add XPRESS (MS-XCA) decompression operations - #2722
Open
MP-GOWTHAM wants to merge 2 commits into
Open
Conversation
Author
|
Correction to the PR description: in WIM/WOF tooling it is specifically the LZ77+Huffman variant that does the work - WIM images and Windows Overlay Filter (Compact OS) files use COMPRESSION_FORMAT_XPRESS_HUFF. The two operations themselves are generic MS-XCA decoders and their descriptions already map the plain op to COMPRESSION_FORMAT_XPRESS, so no code change is needed; this is just to keep the record accurate. |
The mid-stream end-of-data-as-match(3,1) fallback indexed out[-1] when the output was still empty, pushing undefined into the result; guard it the same way the Go and C ports now do. Also raise MAX_DECOMPRESSED from 1 MiB to 32 MiB (WIM chunks can be up to 32 MiB; WOF is 1 MiB) and update the author tags to the real email. Found by the FuzzXpress target added to klauspost/compress.
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.
Adds the two XPRESS (MS-XCA) decompression variants as CyberChef operations, closing a gap versus the WIM/WOF tooling that already supports them:
Implementation lives in \src/core/lib/XPRESS.mjs\ (15-bit canonical Huffman tables, 2^16-byte window, end-of-data symbol 256, 1 MiB output guard). Ops are registered in the Compression category.
Tests cover the MS-XCA section 3.1 worked examples (plain and LZ77+Huffman) plus a long-offset match case; all 2284 operation tests and 272 node tests pass.