Repository navigation
Conversation
LamentXU123
reviewed
Apr 24, 2026
iliaal
force-pushed
the
feat/stream-filter-max-output
branch
from
April 24, 2026 10:05
248d688 to
af57e75
Compare
iliaal
force-pushed
the
feat/stream-filter-max-output
branch
from
April 27, 2026 10:40
af57e75 to
ae11615
Compare
Member
|
This needs to resolve conflicts |
Optional max_output parameter on zlib.inflate and bzip2.decompress caps bytes emitted by the filter. When the instance has a cap set and exceeds it, the current bucket is dropped and the filter returns PSFS_ERR_FATAL, stopping decompression amplification mid-stream instead of after the full payload lands on the sink. The parameter is opt-in. Omitting it preserves existing behavior for all current callers. Userland opts in via stream_filter_append($stream, 'zlib.inflate', STREAM_FILTER_WRITE, ['max_output' => N]).
iliaal
force-pushed
the
feat/stream-filter-max-output
branch
from
November 7, 2026 13:27
ae11615 to
0bdcd70
Compare
Member
Author
|
Rebased. |
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.
Adds
max_outputtozlib.inflateandbzip2.decompress. When set, the filter tracks emitted bytes; once the cap is exceeded, the current bucket is dropped and the filter returnsPSFS_ERR_FATAL, halting decompression mid-stream rather than after the full payload lands on the sink.Opt-in on both filters. Omitting the key keeps existing behavior for every current caller. From userland:
stream_filter_append($stream, 'zlib.inflate', STREAM_FILTER_WRITE, ['max_output' => N]).A follow-up PR will wire this into phar so crafted archives with inflated
uncompressed_filesizefail during streaming.