Auto-port 5.0: Codec-compression: Add Lz4FrameDecompressor - #17170
Merged
Conversation
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)
✅ All tests passed ✅🏷️ Commit: 900e265 Learn more about TestLens at testlens.app. |
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.
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
Lz4FrameDecompressorusing the newDecompressorAPI 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, with0allowing 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 verifypasses with 394 codec-compression tests, including checkstyle and XML formatting checks.Part of #16743.