[RNTuple] add LZ4 compression for RNTuple writing and default to it#439
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds ROOT-style write-time compression for UnROOT’s RNTuple writer, defaulting output to LZ4 (ROOT fCompress 404), and expands CI validation to cross-check written files with C++ ROOT via a data-driven sidecar spec.
Changes:
- Implement ROOT compression block framing for RNTuple writing (LZ4/ZSTD/ZLIB) and apply it to header/footer/page-link envelopes and per-page payloads.
- Default
write_rntuple(...; compression=...)to LZ4 (404) and propagatefCompressinto the ROOT file header. - Replace the previous ad-hoc ROOT validation script with a JSON-driven validator and run it in CI for multiple compression settings.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/RNTuple/Writing/compression.jl |
Adds ROOT block framing and per-algorithm compression helpers for the writer. |
src/RNTuple/Writing/TFileWriter.jl |
Plumbs compression through writing, compresses envelopes/pages, and records on-disk sizes in locators/anchor. |
src/UnROOT.jl |
Imports zlib compression APIs and includes the new compression implementation. |
test/RNTupleWriting/highlevel.jl |
Adds round-trip tests across compression modes and checks default LZ4 behavior/size impact. |
test/RNTupleWriting/output_sample.jl |
Generates deterministic sample data plus a JSON sidecar describing expected values and compression. |
test/RNTupleWriting/validate_rntuple.py |
New ROOT-based validator that checks readability and exact value correctness from the JSON sidecar. |
test/RNTupleWriting/test1.py |
Removes the old minimal validation script. |
.github/workflows/cvmfs.yml |
Updates CI to generate/validate files for multiple compression settings using C++ ROOT. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Let's go ;) |
tamasgal
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this goes on top of #438 (I don't have Stacked PR so no UI sugar :()