Skip to content

Make default decompression limit configurable - #93

Merged
yawkat merged 3 commits into
mainfrom
issue-91-configurable-decompression-limit
Sep 12, 2026
Merged

Make default decompression limit configurable#93
yawkat merged 3 commits into
mainfrom
issue-91-configurable-decompression-limit

Conversation

@yawkat

@yawkat yawkat commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • allow overriding the 64 MiB default for LZ4DecompressorWithLength with the net.jpountz.lz4.LZ4DecompressorWithLength.maxDecompressedLength system property
  • retain explicit constructor limits and decompression-ratio protections
  • include relevant lengths and limits in decompression errors
  • recommend frame streams for large or unknown-size inputs

Verification

  • OutOfBoundsTest: 1,092 tests passed
  • full mvn verify: 1,742 tests passed, 34 skipped
  • Javadocs and artifacts built successfully

Resolves #91

yawkat and others added 2 commits September 12, 2026 02:07
Co-Authored-By: multicode <multicode@yawk.at>
Co-Authored-By: multicode <multicode@yawk.at>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new configuration path lacks tests, and existing constructor documentation contradicts the configurable limit.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Makes the default decompression limit configurable while retaining explicit limits and safety checks.

Changes:

  • Adds a system-property override for the 64 MiB default.
  • Improves decompression error diagnostics.
  • Recommends frame streams for large inputs.
File summaries
File Description
LZ4DecompressorWithLength.java Adds configuration, diagnostics, and guidance.
LZ4CompressorWithLength.java Documents limits and streaming alternatives.
OutOfBoundsTest.java Updates expected diagnostic messages.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/java/net/jpountz/lz4/LZ4DecompressorWithLength.java
Comment thread src/java/net/jpountz/lz4/LZ4DecompressorWithLength.java
Co-Authored-By: multicode <multicode@yawk.at>
@yawkat
yawkat enabled auto-merge (squash) September 12, 2026 02:14
@yawkat
yawkat merged commit b383b9e into main Sep 12, 2026
6 checks passed
@yawkat
yawkat deleted the issue-91-configurable-decompression-limit branch September 12, 2026 02:48
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.

Consider making DEFAULT_MAX_DECOMPRESSED_LENGTH overridable by system property

2 participants