Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
42456f2
* screenshots refresh only on branches that change the UI
Hawkynt Oct 26, 2026
11bdfd2
+ ZIP method 95 (XZ): read and write
Hawkynt Oct 26, 2026
c01351b
* regenerate references
Hawkynt Oct 26, 2026
0edd488
# XAR: bzip2, lzma and xz members decoded and checked against the TOC
Hawkynt Oct 26, 2026
393d095
* regenerate references
Hawkynt Oct 26, 2026
3bcfeb8
# LHA: -lh2- and -lh3- decoded with their own decoders, writing them …
Hawkynt Oct 26, 2026
6493e5c
* regenerate references
Hawkynt Oct 26, 2026
e199a5f
# LHA: header levels 1/3, lh1, lzs, lz5, pm1, pm2 and lhx read as the…
Hawkynt Oct 26, 2026
fc95094
# PackIt and DiskDoubler: real on-disk formats, decode or refuse
Hawkynt Oct 26, 2026
2350d2a
* regenerate references
Hawkynt Oct 26, 2026
fd7e239
* FreeArc: real FreeArc 0.67 archives, read and write
Hawkynt Oct 26, 2026
dd3a154
* regenerate references
Hawkynt Oct 26, 2026
685d627
* NSIS: real installer format, solid and non-solid, read-only
Hawkynt Oct 26, 2026
7200477
* regenerate references
Hawkynt Oct 26, 2026
ffc73b3
+ PartitionedDisk write support, 4Kn GPT, BSD/Amiga/Sun/SGI labels, r…
Hawkynt Oct 26, 2026
2cb06be
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
ad124fa
* refresh the application screenshot
github-actions[bot] Oct 26, 2026
fc8ce06
* regenerate references
Hawkynt Oct 26, 2026
1cfcb4f
# partition add counts in the disk's own sector size on 4Kn disks
Hawkynt Oct 26, 2026
dfd763c
* refresh the application screenshot
github-actions[bot] Oct 26, 2026
c6d48b5
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
1ab5fe6
* CVF codecs: clean-room DS/JM/SQ reimplementation, SD-4 encoder with…
Hawkynt Oct 26, 2026
148a622
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
089bc8b
* regenerate references
Hawkynt Oct 26, 2026
481be6f
* Inno Setup: real file extraction, setup data 1.3 to 7.1, read-only
Hawkynt Oct 26, 2026
b171283
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
6afb631
* refresh the application screenshot
github-actions[bot] Oct 26, 2026
96c9580
* regenerate references
Hawkynt Oct 26, 2026
61af4a1
* ZPAQ: real journaling/streaming format, zpaq 7.15 reads what we write
Hawkynt Oct 26, 2026
d69e707
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
3b92dff
* regenerate references
Hawkynt Oct 26, 2026
841dc25
+ Reiser4 plugin profiles, tails, compressed clusters, links, journal…
Hawkynt Oct 26, 2026
6c6dd7b
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
f7ceb83
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
ddd6109
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
987e25d
* refresh the application screenshot
github-actions[bot] Oct 26, 2026
dd7c332
* refresh the application screenshot
github-actions[bot] Oct 26, 2026
a5b5eea
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
7e5d2d4
* regenerate references
Hawkynt Oct 26, 2026
c869b83
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
d91ec8d
* refresh the application screenshot
github-actions[bot] Oct 26, 2026
74cb883
* refresh the archive browser screenshot
github-actions[bot] Oct 26, 2026
aa8748a
* record LHA decoder provenance and merge CI prerequisites
Hawkynt Oct 26, 2026
fd0f4d9
* record lhasa provenance and merge CI prerequisites
Hawkynt Oct 26, 2026
1c3d3f2
* record DiskDoubler provenance and merge CI prerequisites
Hawkynt Oct 26, 2026
05f41f3
* merge validated provenance prerequisites for FreeArc
Hawkynt Oct 26, 2026
32f1345
* merge validated provenance prerequisites for NSIS
Hawkynt Oct 26, 2026
6c11eee
* merge validated provenance prerequisites for partitioned disks
Hawkynt Oct 26, 2026
8f36f0b
* merge validated provenance prerequisites for 4Kn partition add
Hawkynt Oct 26, 2026
7b8eaa1
* reconcile CVF provenance with the clean-room rewrite
Hawkynt Oct 26, 2026
eb4c589
* record Inno Setup provenance and merge CI prerequisites
Hawkynt Oct 26, 2026
41d6a9c
* record ZPAQ provenance and merge validated train prerequisites
Hawkynt Oct 26, 2026
7c4bac0
* merge validated provenance prerequisites for Reiser4
Hawkynt Oct 26, 2026
a37585f
* isolate Reiser4 profiles from pending formats
Hawkynt Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
run: >
dotnet test Compression.Tests
--configuration Release --no-build
--filter "FullyQualifiedName~Compression.Tests.Reiser4.Reiser4ProfileExternalTests|FullyQualifiedName~Compression.Tests.Reiser4.Reiser4MutationExternalTests|FullyQualifiedName~Compression.Tests.Reiser4.Reiser4NativeTreeExternalTests"
--filter "FullyQualifiedName~Compression.Tests.Reiser4.Reiser4ProfileExternalTests|FullyQualifiedName~Compression.Tests.Reiser4.Reiser4MutationExternalTests|FullyQualifiedName~Compression.Tests.Reiser4.Reiser4NativeTreeExternalTests|FullyQualifiedName~Compression.Tests.Reiser4.Reiser4FeatureExternalTests"
--logger "trx;LogFileName=reiser4-oracle-tests.trx"

# bcachefs-tools' own checker judges every volume this package writes or
Expand Down
7 changes: 7 additions & 0 deletions Compression.Tests/Compression.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@
Exclude="StructuredPseudoArchives\ReferenceVectors\*.py;StructuredPseudoArchives\ReferenceVectors\*.pl;StructuredPseudoArchives\ReferenceVectors\*.ps1;StructuredPseudoArchives\ReferenceVectors\README.md">
<LogicalName>ReferenceVectors.%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
<!-- Volumes a Reiser4 kernel wrote under mkfs.reiser4 plugin profiles, with the kernel's read-back;
see Reiser4/ReferenceVectors/README.md. -->
<EmbeddedResource Include="Reiser4\ReferenceVectors\*.gz;Reiser4\ReferenceVectors\*.manifest">
<LogicalName>Reiser4Vectors.%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
<!-- The QEMU harness that lets a Reiser4 kernel judge what the writer produces. -->
<None Include="Reiser4\KernelOracle\*.sh" CopyToOutputDirectory="PreserveNewest" LinkBase="Reiser4\KernelOracle" />
<!-- Volumes bcachefs-tools wrote; see BcacheFs/ReferenceVectors/README.md. -->
<EmbeddedResource Include="BcacheFs\ReferenceVectors\*.gz;BcacheFs\ReferenceVectors\manifest.txt">
<LogicalName>BcacheFsVectors.%(Filename)%(Extension)</LogicalName>
Expand Down
2 changes: 2 additions & 0 deletions Compression.Tests/Reiser4/KernelOracle/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Run by bash under Linux or WSL.
*.sh text eol=lf
68 changes: 68 additions & 0 deletions Compression.Tests/Reiser4/KernelOracle/kernel-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash
# Boots a Reiser4-enabled Linux kernel under QEMU with an image as /dev/vda and runs a shell
# script inside it; the script's output is printed between ===GUEST-BEGIN=== and ===GUEST-END===.
#
# kernel-run.sh <image> <guest-script> [payload-dir]
#
# The kernel is Metztli's Debian build of Linux 5.4.18 with the Reiser4 (SFRN 4.0.2) patch
# (linux-image-5.4.0-3+reizer4.0.2-cloud-amd64). It is fetched once into $CWB_REISER4_KERNEL
# (default ~/.cache/cwb/reiser4-kernel) together with Ubuntu's busybox-static for the initramfs.
# Nothing here is a build input: the tests that use it skip when it cannot run.
set -e
K=${CWB_REISER4_KERNEL:-$HOME/.cache/cwb/reiser4-kernel}
KV=5.4.0-3+reizer4.0.2-cloud-amd64
DEB_URL='https://sourceforge.net/projects/metztli-reiser4/files/RyzenEpyc_Reiser4-SFRN-4.0.2_Linux-5.4.18-1_for-Debian_Buster/linux-image-5.4.0-3%2Breizer4.0.2-cloud-amd64_5.4.18-1%2Breizer4.0.2_amd64.deb/download'

if [ "$1" = "--check" ]; then
[ -f "$K/x/boot/vmlinuz-$KV" ] && [ -x "$K/bb/usr/bin/busybox" ] && command -v qemu-system-x86_64 >/dev/null
exit $?
fi
if [ "$1" = "--prepare" ]; then
mkdir -p "$K"
if [ ! -f "$K/x/boot/vmlinuz-$KV" ]; then
curl -sfL -A "Wget/1.21" -o "$K/kernel.deb" "$DEB_URL"
mkdir -p "$K/x" && dpkg-deb -x "$K/kernel.deb" "$K/x"
fi
if [ ! -x "$K/bb/usr/bin/busybox" ]; then
(cd "$K" && apt-get download busybox-static >/dev/null 2>&1 && mkdir -p bb && dpkg-deb -x busybox-static*.deb bb)
fi
[ -f "$K/x/boot/vmlinuz-$KV" ] && [ -x "$K/bb/usr/bin/busybox" ] && command -v qemu-system-x86_64 >/dev/null
exit $?
fi

M=$K/x/lib/modules/$KV/kernel
R=$(mktemp -d)
trap 'rm -rf "$R" "$R.cpio.gz" "$R.log"' EXIT
mkdir -p "$R/bin" "$R/mods" "$R/dev" "$R/proc" "$R/sys" "$R/mnt" "$R/payload"
cp "$K/bb/usr/bin/busybox" "$R/bin/"
for a in $("$K/bb/usr/bin/busybox" --list); do [ "$a" = busybox ] || ln -s busybox "$R/bin/$a"; done
for m in drivers/virtio/virtio.ko drivers/virtio/virtio_ring.ko drivers/virtio/virtio_pci.ko drivers/block/virtio_blk.ko \
lib/xxhash.ko lib/zstd/zstd_compress.ko lib/zstd/zstd_decompress.ko crypto/crc32c_generic.ko fs/reiser4/reiser4.ko; do
cp "$M/$m" "$R/mods/"
done
cp "$2" "$R/run.sh"
[ -n "$3" ] && cp -a "$3"/. "$R/payload/"
cat > "$R/init" <<'EOF'
#!/bin/busybox sh
export PATH=/bin
mount -t proc proc /proc; mount -t sysfs sys /sys; mount -t devtmpfs dev /dev
echo "===GUEST-BEGIN==="
for m in virtio virtio_ring virtio_pci virtio_blk xxhash zstd_compress zstd_decompress crc32c_generic reiser4; do
insmod /mods/$m.ko || echo "insmod $m failed"
done
sleep 0.3
sh /run.sh 2>&1
echo "===GUEST-END rc=$?==="
dmesg | grep -i -E "reiser4|bug|oops" | grep -v "loading out-of-tree" | sed 's/^/dmesg: /'
sync
poweroff -f
EOF
chmod +x "$R/init"
(cd "$R" && find . | cpio -o -H newc 2>/dev/null | gzip -1) > "$R.cpio.gz"
ACC=-enable-kvm; [ -w /dev/kvm ] || ACC="-accel tcg"
timeout ${CWB_REISER4_KERNEL_TIMEOUT:-900} qemu-system-x86_64 $ACC -m 1024 -nographic -no-reboot \
-kernel "$K/x/boot/vmlinuz-$KV" -initrd "$R.cpio.gz" \
-append "console=ttyS0 quiet panic=-1" \
-drive file="$1",format=raw,if=virtio,cache=unsafe 2>&1 | tr -d '\r' > "$R.log" || true
sed -n '/===GUEST-BEGIN===/,$p' "$R.log" | grep -v '^\s*$'
grep -q '===GUEST-END' "$R.log"
14 changes: 14 additions & 0 deletions Compression.Tests/Reiser4/KernelOracle/manifest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Guest script: mounts /dev/vda and prints one line per object the kernel resolves, reading every
# regular file whole: path|type|mode|uid|gid|size|nlink|mtime|major:minor|md5-or-link-target
mount -t reiser4 /dev/vda /mnt || { echo MOUNTFAIL; exit 1; }
cd /mnt
echo "===MANIFEST==="
find . | sort | while read p; do
t=$(stat -c '%F|%a|%u|%g|%s|%h|%Y|%t:%T' "$p")
if [ -L "$p" ]; then echo "$p|$t|$(readlink "$p")"
elif [ -f "$p" ]; then echo "$p|$t|$(md5sum < "$p" | cut -d' ' -f1)"
else echo "$p|$t|"; fi
done
echo "===END-MANIFEST==="
cd /
umount /mnt || echo UMOUNTFAIL
5 changes: 5 additions & 0 deletions Compression.Tests/Reiser4/ReferenceVectors/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Volumes a Reiser4 kernel wrote, gzip-compressed: the bytes are the fixture.
*.gz -text
# Manifests and scripts are read by Linux tools and compared byte for byte.
*.manifest text eol=lf
*.sh text eol=lf
41 changes: 41 additions & 0 deletions Compression.Tests/Reiser4/ReferenceVectors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Reiser4 reference volumes

Volumes a Reiser4 kernel wrote, checked in so the reader and editor tests run without Linux tools.
`generate.sh` documents how they were made; it is not a build input.

Each volume was formatted by `mkfs.reiser4 -fffy` (reiser4progs 1.2.2, 16 MiB, UUID
`11111111-2222-3333-4444-555555555555`) with the plugin options below, then filled by `populate.sh`
inside the kernel — Metztli's Debian build of Linux 5.4.18 with the Reiser4 SFRN 4.0.2 patch
(`linux-image-5.4.0-3+reizer4.0.2-cloud-amd64`), booted under QEMU by
`../KernelOracle/kernel-run.sh`. The tree holds files of 0 to 200 705 bytes (random, and a 69 559-byte text that spans two 64 KiB clusters), nested
and empty directories, names of 35, 46 and 255 bytes, names ending in `.c`, `.o` and `.abc`,
a short and a 423-byte symlink, a file with three names, a FIFO, character device 1:3, block device
7:0, a file with a hole, a 300-entry directory, an owner of 1234:5678 with mode 0751, and a
modification time in 2001.

| File | mkfs.reiser4 options | What it exercises |
|------|------------------|-------------------|
| `default` | — | cryptcompress files (lzo1, conv mode, 64 KiB clusters), the kernel turning incompressible ones into extents |
| `gzip1-force-8k` | `compress=gzip1,compressMode=force,cluster=8K` | raw-deflate clusters with their Adler-32 |
| `zstd1-latt-16k` | `compress=zstd1,compressMode=latt,cluster=16K` | Zstandard clusters |
| `lzo1-none-4k` | `compressMode=none,cluster=4K` | uncompressed clusters |
| `reg40-smart` | `create=reg40` | tails up to four blocks, extents above |
| `reg40-tails` | `create=reg40,formatting=tails` | tails only |
| `reg40-node41` | `create=reg40,formatting=extents,node=node41` | checksummed nodes, extents only |
| `node41` | `node=node41` | checksummed nodes with cryptcompress files |
| `tea-lexic` | `create=reg40,hash=tea_hash,fibration=lexic_fibre` | TEA-hashed long names, no fibres |
| `fnv1-dot-o` | `create=reg40,hash=fnv1_hash,fibration=dot_o_fibre` | FNV-1 long names, `.o` fibre |
| `deg-ext-3` | `create=reg40,hash=deg_hash,fibration=ext_3_fibre` | degenerate hash, three-letter extension fibres |
| `rupasov` | `create=reg40,hash=rupasov_hash` | read only: `fsck.reiser4` disagrees with the kernel's Rupasov keys |
| `journal-replay` | `create=reg40` | a commit the kernel had not yet written back: block 19 names transaction 181, block 20 transaction 130 |

`<name>.manifest` is what the kernel read back after unmounting and mounting again: one line per
object, `path|type|mode|uid|gid|size|nlink|mtime|major:minor|md5-or-link-target`, every regular file
read whole. For `journal-replay` the kernel replayed the journal at mount, so the manifest is the
post-replay state. `default` and `node41` list two fewer `many/` files than the others and
`gzip1-force-8k` one fewer: the kernel itself did not keep them, and the reader agrees with what it
did keep.

Every volume except `rupasov` passed `fsck.reiser4 --check` (`journal-replay` after the replay that
check performs). Captured 2026-10-19 on Ubuntu 24.04 under WSL2 (the WSL kernel has no Reiser4
driver; the QEMU guest is the only writer). Compressed with `gzip -9 -n`.
Binary file not shown.
Loading
Loading