mirror of
https://github.com/morluto/rea.git
synced 2026-12-04 22:11:12 +00:00
* fix(uefi): decode LZMA sections through one shared LZMA1 owner UEFI LZMA custom sections whose header declared a dictionary above 64 MiB were refused as an output limit even when their output was tiny, because the worker compared the dictionary with the output budget and handed it to lzma-purejs, which allocates a window of that size. EDK II's one-call LzmaDecode uses its output buffer as the dictionary, so a valid stream never needs more window than its output. src/compression/Lzma1.ts now owns LZMA1 for UEFI and UnityFS: the LZMA-Alone header and LZMA1 property bounds (lc 0-8, lp 0-4, pb 0-4), the range coder lead-in, a decoder window of max(4 KiB, min(dictionary, output bound)), bounded output, and the verdict on a stream. Lzma1Header.ts reads the header fields with BinaryReader at the host boundary. The UEFI worker keeps its framing, x86 branch filter and reply protocol; a corrupt stream or invalid properties are now reported as malformed rather than as a decoder fault. The UnityFS worker thread loads the same module instead of an inline decoder. Closes #14917 * fix(compression): leave LZMA1 host faults to their host decodeLzma1Alone reported every exception from the codec as a malformed stream, so an allocation failure or codec defect inside the decoding host looked like corrupt input, and the codec's own verdict text was lost. Only lzma-purejs's verdict literals ("Error in data stream", "Incorrect stream properties") are now a malformed verdict; anything else is rethrown for the host to classify (UEFI reports it as a decoder fault, the UnityFS worker as a runtime failure).