Skip to content

Add XZ compression and streaming support to io#1731

Closed
nmaguiar wants to merge 1 commit intot8from
codex/add-support-for-xz-compression-format
Closed

Add XZ compression and streaming support to io#1731
nmaguiar wants to merge 1 commit intot8from
codex/add-support-for-xz-compression-format

Conversation

@nmaguiar
Copy link
Collaborator

@nmaguiar nmaguiar commented Mar 1, 2026

Motivation

  • Provide parity with existing gzip helpers by adding support for the XZ compression format using the already-included Apache Commons Compress library.
  • Allow scripts and plugins to compress/decompress byte arrays and use streaming XZ readers/writers the same way they do for gzip.

Description

  • Added XZ byte-array helpers io.xz(...) and io.unxz(...) implemented with XZCompressorOutputStream / XZCompressorInputStream in src/openaf/core/IO.java.
  • Added XZ stream APIs io.writeFileXzStream(...) and io.readFileXzStream(...) in src/openaf/core/IO.java for file streaming support.
  • Exposed the new methods through openaf.IOBase (src/openaf/IOBase.java) so they are available via the same public IO surface as existing gzip helpers.
  • Added JS tests in tests/autoTestAll.IO.js to validate native byte-array roundtrip (testXzNativeToByte) and stream read/write roundtrip (testIOXzStream).

Testing

  • Attempted mvn -DskipTests package; build failed in this environment because the Maven build invokes the ojob tool which is not available here (build step external to code changes).
  • Ran a packaging build with exec steps skipped via mvn -DskipTests -Dexec.skip=true package, which completed successfully.
  • Added tests in tests/autoTestAll.IO.js (JS oJob tests); they were added to the test suite but were not executed in this environment due to the project build invoking external tooling.

@nmaguiar nmaguiar closed this Mar 2, 2026
@nmaguiar nmaguiar deleted the codex/add-support-for-xz-compression-format branch March 2, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant