Problem
packages/compression currently has no build graph that compiles its implementations:
zig build testpoints to nonexistenttests/gzip_test.zigandtests/zstd_test.zig.- the default shipped build points to nonexistent
examples/gzip_example.zig,examples/zstd_example.zig, andexamples/benchmark.zig. - the only existing test file,
tests/compression_tests.zig, checks format constants and imports none ofsrc/gzip.zig,src/zstd.zig, or the public package root.
Both the shipped and test commands therefore fail at file loading before reaching the package. This masks a substantial Zig 0.18 migration in src/gzip.zig/src/zstd.zig: removed allocator-bound ArrayList operations, removed legacy std.io reader/writer surfaces, and implicit wall-clock access (std.time.timestamp).
This is the expensive std.Io class identified by #884, not a safe blanket rename.
Required work
- Build and test the actual public compression root.
- Replace nonexistent build targets with real artifacts or remove unsupported targets deliberately.
- Inject
std.Iowherever compression metadata needs wall-clock time or streams. - Port buffers/readers/writers to current APIs without changing wire formats.
- Add round-trip and malformed-input tests for every advertised implementation.
- Ensure the same modules/configuration are used by tests and installed artifacts.
- Verify Debug and ReleaseFast on the pinned compiler and Zig 0.18 master, plus compile-only Linux targets.
No placeholder tests, test weakening, or silent time/entropy fallback.