Skip to content

feat(zstd): multi-frame encode#170

Merged
dfa1 merged 1 commit into
mainfrom
feat/zstd-multi-frame-encode
Jun 26, 2026
Merged

feat(zstd): multi-frame encode#170
dfa1 merged 1 commit into
mainfrom
feat/zstd-multi-frame-encode

Conversation

@dfa1

@dfa1 dfa1 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the last vortex.zstd TODO item (multi-frame encode). new ZstdEncodingEncoder(valuesPerFrame) splits the payload into independently compressed zstd frames of valuesPerFrame values each, emitting one ZstdFrameMetadata per frame — so a slice scan can decompress only the frames overlapping its row range. The no-arg constructor keeps the single-frame behaviour.

What changed

  • ZstdEncodingEncoder — new valuesPerFrame field + configuring constructor. Frame boundaries fall on value boundaries: fixed stride for primitives, length-prefix walk for varbin. Works for non-nullable and nullable paths (frames cover the packed valid values; the validity child's buffers trail the frame buffers). The decoder already iterates meta.frames(), so this is encode-only.
  • TestsMultiFrame unit cases (primitive split, varbin value-boundary split, nullable framing) + Rust-interop IT javaWriter_rustReader_zstd_multiFrameI64 (7 values → 3 frames, Rust reads it back).
  • TODO.md — removed the completed item.
  • CHANGELOG.mdAdded entry.

Testing

  • 20/20 ZstdEncodingEncoderTest (3 new), single-frame backward-compat intact.
  • Rust-interop multi-frame IT green.
  • javadoc failOnWarnings clean (new public constructor).

🤖 Generated with Claude Code

Add ZstdEncodingEncoder(valuesPerFrame): split the payload into
independently compressed zstd frames of valuesPerFrame values each (the
last frame holds the remainder), emitting one ZstdFrameMetadata per
frame so a slice scan can decompress only the frames overlapping its row
range. The no-arg constructor keeps the single-frame behaviour.

Frame boundaries fall on value boundaries: fixed stride for primitives,
length-prefix walk for varbin. Works for the non-nullable and nullable
(frames over packed valid values, validity child trailing the frame
buffers) paths alike. The decoder already iterates frames, so this is
encode-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 force-pushed the feat/zstd-multi-frame-encode branch from 3188a22 to f3bace2 Compare June 26, 2026 18:12
@dfa1 dfa1 merged commit 5efca29 into main Jun 26, 2026
@dfa1 dfa1 deleted the feat/zstd-multi-frame-encode branch June 26, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant