omega-zip
omega-zip: ZIP archive reader in seeded Omega (store and deflate, CRC-32, fail-closed refusals)
Brought by drakestapleton
omega-zip / corpus / SOURCES.txt
| 1 | omega-zip test corpus: where every file comes from, its licence, and the oracle command that made it. |
| 2 | Made on the Spark (Linux AArch64) on 2026-11-10 from the repository root. The oracle tools are test-only |
| 3 | and never part of omega-zip: Python 3.12.3 with zlib 1.3 (Ubuntu zlib1g 1:1.3.dfsg-3.1ubuntu2.1), |
| 4 | Info-ZIP Zip 3.0 (3.0-13ubuntu0.2) and Info-ZIP UnZip 6.0 (6.0-28ubuntu4.1). No file was downloaded. |
| 5 | |
| 6 | corpus/src: the original bytes |
| 7 | OMEGESE.md omega-mv 82e536e1 docs/one_layer/OMEGESE.md Apache-2.0 (omega-mv LICENSE) |
| 8 | om4.bin omega-mv 82e536e1 seed/rung4/om4.bin (machine code) Apache-2.0 (omega-mv LICENSE) |
| 9 | LICENSE-2.0.txt omega-mv 82e536e1 LICENSE (the Apache License 2.0 text) its own terms allow copies |
| 10 | text.om omega-mv 82e536e1 seed/text/text.om Apache-2.0 (omega-mv LICENSE) |
| 11 | zeros100000 head -c 100000 /dev/zero no content; ours (Apache-2.0) |
| 12 | rand70000 head -c 70000 /dev/urandom on the Spark, 2026-11-10 no content; ours (Apache-2.0) |
| 13 | empty0 the empty file ours |
| 14 | one1 head -c 1 OMEGESE.md as OMEGESE.md |
| 15 | omegese65535, omegese65536, omegese65537 head -c N OMEGESE.md (the 64 KiB boundary sizes) |
| 16 | |
| 17 | corpus/raw/NAME.lL and corpus/zlib/NAME.lL: corpus/src/NAME compressed by python3 zlib at level L |
| 18 | (0, 1, 6, 9), raw DEFLATE (wbits -15) and zlib (wbits 15): |
| 19 | python3 -c 'import sys,zlib; c=zlib.compressobj(int(sys.argv[1]),zlib.DEFLATED,int(sys.argv[2])); sys.stdout.buffer.write(c.compress(sys.stdin.buffer.read())+c.flush())' L -15 < corpus/src/NAME > corpus/raw/NAME.lL |
| 20 | python3 -c '(same)' L 15 < corpus/src/NAME > corpus/zlib/NAME.lL |
| 21 | The expected output of each is corpus/src/NAME itself (python3 zlib.decompress gives it back). |
| 22 | |
| 23 | corpus/expect/NAME.crc: python3 -c 'import sys,zlib; print("%08x" % zlib.crc32(sys.stdin.buffer.read()))' < corpus/src/NAME |
| 24 | |
| 25 | corpus/zip |
| 26 | Modern_business_letter_serif.ott, Modern_business_letter_sans_serif.ott (usr/lib/libreoffice/share/ |
| 27 | template/common/officorr/), Pencil.otp, Focus.otp (.../common/presnt/): LibreOffice 24.2.7 templates |
| 28 | from the Ubuntu package on the Spark, MPL-2.0 (/usr/share/doc/libreoffice-common/copyright, "Files: *", |
| 29 | License: MPL-2.0). Copied unchanged. |
| 30 | The rest were made by Info-ZIP zip from copies of corpus/src files in a scratch directory: |
| 31 | aa/evil.txt = head -c 3000 OMEGESE.md, st.txt = head -c 100 OMEGESE.md, |
| 32 | tree/ = text.om om4.bin sub/LICENSE-2.0.txt sub/empty0 sub/deep/rand70000 sub/deep/zeros100000 |
| 33 | base.zip zip -X -q base.zip aa/evil.txt |
| 34 | st.zip zip -X -q -0 st.zip st.txt |
| 35 | dd.zip zip -X -q -fd - aa/evil.txt > dd.zip (streamed: data descriptors, flag bit 3) |
| 36 | zip64.zip zip -X -q -fz zip64.zip aa/evil.txt (ZIP64 records; a refusal case) |
| 37 | treeL.zip zip -X -q -r -L treeL.zip tree (L = 0, 1, 6, 9) |
| 38 | treedd.zip zip -X -q -r -fd - tree > treedd.zip |
| 39 | ctrlname.zip zip -X -q ctrlname.zip one1 "$(printf 'c\001x')" (a copy of text.om under a name with byte 01) |
| 40 | comment.zip printf 'a comment\nline2' | zip -X -q -z comment.zip one1 (zip stores the comment with CR LF) |
| 41 | -X leaves out the extra fields, so UnZip prints the MS-DOS date and time fields (no time zone). |
| 42 | |
| 43 | corpus/expect (UnZip 6.0 from the repository root, so the "Archive:" line names corpus/zip/NAME) |
| 44 | NAME.l = unzip -l corpus/zip/NAME, NAME.v = unzip -v corpus/zip/NAME, NAME.p = unzip -p corpus/zip/NAME |
| 45 | (tree.p is unzip -p of tree0.zip, byte-equal to that of tree1, tree6, tree9 and treedd; base.zip.p is |
| 46 | also dd.zip's), Pencil.otp.content.xml = unzip -p corpus/zip/Pencil.otp content.xml, |
| 47 | Focus.otp.thumbnail.png = unzip -p corpus/zip/Focus.otp Thumbnails/thumbnail.png, |
| 48 | ok-fixed.out = printf AAAA, ok-stored.out = printf hello. |
| 49 | |
| 50 | corpus/refuse: written by tests/mkcases.om (Omega, in this repository), ours (Apache-2.0) |
| 51 | *.raw, *.zlib: the hand-built streams of mkcases.om's `cases` table, ok-allcodes.raw/.out, and |
| 52 | zl-adler.zlib / zl-trunc.zlib (corpus/zlib/text.om.l6 with the last byte changed / 2 bytes cut). |
| 53 | z-*.zip: base.zip, st.zip or dd.zip with one field changed (see mkcases.om `zips`); z-overlap.zip is |
| 54 | base.zip with its central entry written twice (mkcases.om `overlap`). |
| 55 | The oracle's verdict on each is in corpus/refuse/ORACLE.txt. |