Skip to content

+ PEA (PeaZip) archives: read and create - #506

Open
Hawkynt wants to merge 9 commits into
mainfrom
feat/pea
Open

Hawkynt wants to merge 9 commits into
mainfrom
feat/pea

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

PEA had no descriptor. Reader: single-volume PEA 1.x with every check PeaZip offers (Adler-32, CRC-32, CRC-64, MD5, RIPEMD-160, SHA-1/256/512, Whirlpool, SHA3-256/512, BLAKE2s/b) verified at object, stream and volume level; stored and zlib 1 MiB blocks; names relative to the common directory as unpea extracts them. Encrypted and multi-volume archives refused. Writer: PeaZip's Unix layout with CRC-32/SHA-256/CRC-32 checks by default.

Also fixes Whirlpool: digests were wrong for inputs whose length mod 64 is 31..55 (padding sized for a 64-bit instead of Whirlpool's 256-bit length). Found via PeaZip's Whirlpool object checks; now matches the ISO vectors and OpenSSL.

Verified: seven archives PeaZip 11.4 wrote (all levels, all check families, a three-block file) are committed and decode with every check verified; PeaZip's pea (headless) extracts what we write byte for byte. Rung 3: public-domain PEA spec plus PeaZip sources (LGPL-3.0) read for field order.

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 remaining diff is this PR's format change. The refreshed solution build and focused format, firmware, README and architecture checks pass.

Hawkynt and others added 9 commits October 23, 2026 14:07
PEA had no descriptor, although three of the catalogue's reference sources
list it. A PEA 1.x archive is a 10-byte archive header, one stream whose
header names the compression (stored, or zlib 3/6/9 in independent 1 MiB
blocks; a block that does not shrink is stored) and three checks - per
object, for the stream and for the volume - then objects (name, time,
attributes, size, data) and an end-of-archive trigger.

Reader: single-volume archives with every check PeaZip offers (Adler-32,
CRC-32, CRC-64, MD5, RIPEMD-160, SHA-1, SHA-256, SHA-512, Whirlpool,
SHA3-256/512, BLAKE2s/b), all three levels verified; names relative to the
objects' common directory, as unpea extracts them; Unix and DOS times.
Encrypted streams and multi-stream/multi-volume archives are refused.
Writer: PeaZip's Unix layout (absolute names under "/", Unix times,
1 MiB zlib blocks), CRC-32 objects, SHA-256 stream, CRC-32 volume by default.

Oracle: seven archives PeaZip 11.4 wrote (every compression level, every
check family, a three-block file) are committed and decode with every check
verified; PeaZip's pea (run headless) extracts what we write byte for byte.
The CRC-64 variant (ECMA-182, not reflected, all-ones init and xor-out,
stored low dword first) was identified against those archives.

Sourcing: rung 3 - the public-domain PEA format specification, with
PeaZip's pea.pas / pea_utils.pas (LGPL-3.0) read for the field order; no
code converted.
Whirlpool digests were wrong for every input whose length mod 64 is 31..55
(e.g. "The quick brown fox jumps over the lazy dog"): the padding reserved
room for a SHA-style 64-bit length, but Whirlpool pads to 32 mod 64 and ends
with a 256-bit length, so those tails need two final blocks. Found when
PeaZip's Whirlpool object checks did not verify.

Oracle: the ISO/NESSIE vectors and OpenSSL's legacy-provider Whirlpool.
Retain PEA and main reference resources together, preserve the merged PackIt support description, keep main artwork, and regenerate Archives API documentation.

Verified: Release solution build, 71 focused format/documentation/provenance tests passed, documentation generation completed without errors.
Shared API counts and fixture declarations changed after the PEA branch was prepared. Preserve both fixture sets and regenerate the combined summary. Verified solution build, 77 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 #506. 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