mirror of
https://github.com/morluto/rea.git
synced 2026-12-04 22:11:12 +00:00
* feat(artifacts): decode UnityFS LZMA blocks Unity's default AssetBundle compression (type 1) left members as hash_status unavailable. Decode 5-byte Unity LZMA streams with the existing lzma-purejs dependency so inventory can hash and extract them. * fix(compression): read Unity LZMA dictionary via BinaryReader Architecture guards forbid raw Buffer numeric reads outside binaryContainer; match the UEFI LZMA path. * style(compression): format UnityFS LZMA helper * fix(compression): make UnityFS LZMA cancelable and end-marker safe Accept optional LZMA end markers without trailing junk, decode off-thread so timer aborts land, return one expected-sized buffer, and mark xinzexi unverified. * fix(compression): await Unity LZMA worker exit and transfer alone buffer Await worker.terminate() before settling abort/reply paths, and allocate the synthesized alone header with allocUnsafeSlow so the worker receives it without a second encoded-stream copy. * chore: retrigger CI after Greptile worker-exit follow-up * test(compression): clarify Unity LZMA cancellation case title Retriggers Actions after the worker-exit follow-up push did not receive a GitHub Actions check suite. * fix(unityfs): keep the directory for over-budget LZMA blocks and decode spec-valid streams UnityFS writers emit one LZMA block for a whole data stream, so the per-block decode budget refused the whole inventory of any LZMA bundle above 64 MiB, where before this change the directory was retained. An over-budget block now keeps the directory and only members inside it report an unavailable read naming the budget, for LZ4 and LZMA alike. The LZMA decoder window is bounded by the declared output instead of the declared dictionary, so a large dictionary on a small block decodes and no longer allocates a dictionary-sized window. Properties follow the LZMA specification (lc 0-8, lp 0-4, pb 0-4) rather than the LZMA2 lc + lp limit. Worker error events and exits without a reply stay runtime failures instead of being reported as a malformed block. Tests decode a liblzma-produced stream as a known answer, settle only after the worker exits on completion and cancellation, and share one encoder. * fix(artifacts): report Unity LZMA size mismatch as malformed Overflow past the bundle's declared length is a format error, not a decoder budget exhaustion. Declarations above maximumBytes still fail closed as a resource limit before decode starts. * fix(unityfs): name the encoded or decoded bound that refused a block A block refused by its encoded size reported its decoded size against the decoded budget. The block now records which bound refused it, and the member read names that bound, its declared size and the budget. --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>