Skip to content

Add async Brotli support (compress/decompress).#720

Merged
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:brotli4j
Oct 5, 2025
Merged

Add async Brotli support (compress/decompress).#720
arturobernalg merged 1 commit into
apache:masterfrom
arturobernalg:brotli4j

Conversation

@arturobernalg

Copy link
Copy Markdown
Member

Introduce DeflatingBrotliAsyncEntityProducer and InflatingBrotliAsyncDataConsumer; register "br" when brotli4j is available.

@arturobernalg arturobernalg requested a review from ok2c September 11, 2025 12:54
@garydgregory

Copy link
Copy Markdown
Member

This is confusing. I thought we were using Commons Compress (and a different Brotli library) for this type of functionality.

@arturobernalg

Copy link
Copy Markdown
Member Author

This is confusing. I thought we were using Commons Compress (and a different Brotli library) for this type of functionality.

@garydgregory Gary — we can’t use Apache Commons Compress for the async path because its API is built around blocking InputStream/OutputStream.

@ok2c

ok2c commented Sep 11, 2025

Copy link
Copy Markdown
Member

@garydgregory Gary — we can’t use Apache Commons Compress for the async path because its API is built around blocking InputStream/OutputStream.

@arturobernalg Here's the thing. If you happen to have some time for open-source development, just as an idea, consider contributing async friendly APIs to Commons Compress, which HttpClient could consume the same way it consumes the existing one based on InputStream / OutputStream model for its classic transport.

@arturobernalg

Copy link
Copy Markdown
Member Author

@garydgregory Gary — we can’t use Apache Commons Compress for the async path because its API is built around blocking InputStream/OutputStream.

@arturobernalg Here's the thing. If you happen to have some time for open-source development, just as an idea, consider contributing async friendly APIs to Commons Compress, which HttpClient could consume the same way it consumes the existing one based on InputStream / OutputStream model for its classic transport.

@ok2c Naahh… I’m sure Gary will magically implement all the async APIs in Commons himself — like he normally does for every other module. No need for me to reinvent the wheel there... feel free to cancel the PR

@ok2c

ok2c commented Sep 12, 2025

Copy link
Copy Markdown
Member

@ok2c Naahh… I’m sure Gary will magically implement all the async APIs in Commons himself — like he normally does for every other module. No need for me to reinvent the wheel there... feel free to cancel the PR

@arturobernalg Christ. This is not what I would expect.

I am not in a position to close any of your PR unless I have a better solution of the same problem. Please bear with me, I will review them, but I am presently crushed with day work and H2 protocol handling rewrite. It may take a while.

@arturobernalg

Copy link
Copy Markdown
Member Author

Christ. This is not what I would expect.

I am not in a position to close any of your PR unless I have a better solution of the same problem. Please bear with me, I will review them, but I am presently crushed with day work and H2 protocol handling rewrite. It may take a while.

No problem, Oleg. Thanks for the update. Take your time with the H2 rewrite — keep up the spirit with that.

@ok2c ok2c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@arturobernalg Looks good to me

Introduce DeflatingBrotliAsyncEntityProducer and InflatingBrotliAsyncDataConsumer; register "br" when brotli4j is available.
@arturobernalg arturobernalg merged commit 277adc3 into apache:master Oct 5, 2025
9 of 10 checks passed
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