Skip to content

Auto-port 5.0: Codec-compression: Add Lz4FrameDecompressor - #17170

Merged
chrisvest merged 1 commit into
5.0from
auto-port-pr-17148-to-5.0
Jul 28, 2026
Merged

Auto-port 5.0: Codec-compression: Add Lz4FrameDecompressor#17170
chrisvest merged 1 commit into
5.0from
auto-port-pr-17148-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17148 to 5.0
Cherry-picked commit: 163a33e


Motivation:

The decompressor API migration tracked by #16743 calls for the remaining per-format implementations from #15667 to be split into small, independently reviewable pull requests. LZ4 is one of the remaining formats.

Modification:

Add Lz4FrameDecompressor using the new Decompressor API and builder pattern. Reject truncated streams, limit compressed input to the declared block, and validate the actual decompressed size before publishing output. Add a configurable per-block decompressed length limit that defaults to 256 KiB, with 0 allowing the LZ4 format maximum of 32 MiB. Add shared contract coverage and LZ4-specific malformed-input and limit tests.

Result:

LZ4 frame decompression is available through the new API. ./mvnw -pl codec-compression -am verify passes with 394 codec-compression tests, including checkstyle and XML formatting checks.

Part of #16743.

Motivation:

The decompressor API migration tracked by #16743 calls for the remaining
per-format implementations from #15667 to be split into small,
independently reviewable pull requests. LZ4 is one of the remaining
formats.

Modification:

Add `Lz4FrameDecompressor` using the new `Decompressor` API and builder
pattern. Reject truncated streams, limit compressed input to the
declared block, and validate the actual decompressed size before
publishing output. Add a configurable per-block decompressed length
limit that defaults to 256 KiB, with `0` allowing the LZ4 format maximum
of 32 MiB. Add shared contract coverage and LZ4-specific malformed-input
and limit tests.

Result:

LZ4 frame decompression is available through the new API. `./mvnw -pl
codec-compression -am verify` passes with 394 codec-compression tests,
including checkstyle and XML formatting checks.

Part of #16743.

---------

Co-authored-by: multicode <multicode@yawk.at>
(cherry picked from commit 163a33e)
@chrisvest chrisvest added this to the 5.0.0.Final milestone Jul 28, 2026
@chrisvest
chrisvest enabled auto-merge (squash) July 28, 2026 18:42
@chrisvest
chrisvest merged commit 997b5f4 into 5.0 Jul 28, 2026
13 checks passed
@chrisvest
chrisvest deleted the auto-port-pr-17148-to-5.0 branch July 28, 2026 21:11
@testlens-app

testlens-app Bot commented Jul 28, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 900e265
▶️ Tests: 37895 executed
⚪️ Checks: 12/12 completed


Learn more about TestLens at testlens.app.

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.

3 participants