Skip to content

+ UltraCompressor II (.uc2): read every UC2 release, create r2-readable archives - #505

Open
Hawkynt wants to merge 8 commits into
mainfrom
feat/uc2
Open

Hawkynt wants to merge 8 commits into
mainfrom
feat/uc2

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

UC2 had no descriptor. Reader: FHEAD/XHEAD, checksum-verified central directory, directories, revisions (newest listed), AIP:Win95 LongN / UC2X long names (CP437), custom masters over the embedded SUPER.DAT or no-master, delta methods 21-47 and turbo 80, every file verified by UC2's XOR checksum; UltraCrypt and 2.3 PCP refused. Writer: one 512-byte custom master over the supermaster, files in method 3, directories, unique 8.3 aliases plus LongN tags, version-needed 200.

Verified: nine archives written by the original UC2 r2, PRO 2.3 and 2.37b (klauspost/uc2 testdata, LGPL-3.0) are committed and every file matches its recorded SHA-256; the format's golden vectors decode and encode exactly; unuc2 (independent extractor) tests and extracts our archives byte for byte. Rung 1: converted from klauspost/uc2 (LGPL-3.0); SUPER.DAT copied verbatim, notice included.

Integration update: depends on #537 for shared Intel HEX payload validation exposed by the required Linux suite. The dependency is integrated for CI and must land first; after it merges, the net change against main is this PR's format change. The refreshed solution build and focused format, firmware, README and architecture checks pass.

Hawkynt and others added 8 commits October 23, 2026 14:44
…le archives

UC2 had no descriptor. Its archives are an FHEAD/XHEAD, headerless "Ultra"
streams (LZ77 + Huffman over a 64 KiB history that starts with a dictionary)
for files and for shared masters, and a compressed central directory, each
checked with UC2's 16-bit XOR checksum.

Reader: FHEAD length check (falling back to the spare copy), CDIR decoded
with no master and checksum-verified, directories, revisions (the newest of
each name is listed), "AIP:Win95 LongN" and UC2X long-name tags (CP437),
custom masters decoded over SUPER.DAT or no-master, delta methods 21-47
(dictionary delta'd as UC2 does), turbo method 80. Every file is verified by
its checksum. UltraCrypt (UE2) and 2.3 PCP archives are refused.
Writer: one 512-byte custom master compressed over the supermaster, every
file in method 3 against it, directories, unique 8.3 aliases plus LongN tags,
version needed 200 so UC2 r2 accepts it.

Oracle: 9 archives written by the original UC2 r2, PRO 2.3 and 2.37b
(klauspost/uc2 testdata, LGPL-3.0) are committed; every file's SHA-256
matches the recorded sums, including revisions, delta levels and long names.
The format's golden vectors decode and encode exactly. unuc2 (Jan Bobrowski's
independent extractor) tests and extracts what we write byte for byte.

Sourcing: rung 1 - converted from klauspost/uc2 (LGPL-3.0) and its format.md;
SUPER.DAT copied verbatim from that LGPL-3.0 release; notice in
THIRD-PARTY-NOTICE.UltraCompressor2.txt.
Retain UC2 and main fixtures together, record the existing pinned klauspost/uc2 notice and supermaster dictionary provenance, and regenerate Archives API documentation. Keep main artwork.

Verified: Release solution build, 78 focused format/documentation/provenance tests passed, documentation generation completed without errors.
Current-main fixture and provenance additions overlap UC2 entries. Preserve both sets, recount the ledger and regenerate the archive API summary. Verified solution build, 84 focused tests and archive documentation generation.
Adding a second named payload to Intel HEX could silently discard a file because the shared image builder kept only the first payload in filesystem enumeration order. Reject multiple non-metadata payloads, including an empty first payload, before any output is written. Tests verify creation refusal and byte-preserving add refusal.

Verified all three regressions fail before the fix and pass after it, 93 focused tests, 34280 required tests with 1582 skips and no failures, and three package documentation checks.
Bring the firmware payload validation fix onto current main after partitioned-disk support merged. Verified solution build, 299 focused tests and all three package documentation checks; the preceding required suite passed 34280 tests.
Integrate the independently tested Intel HEX payload-loss fix from PR #537 before rerunning the required suite for PR #505. Verified the solution build and focused format, firmware, documentation and architecture tests.
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.

1 participant