Skip to content

Conversation

@vprus
Copy link
Contributor

@vprus vprus commented Jan 21, 2026

There are already methods operating on ByteBuffer, however versions taking streams allow to avoid data copying, and are more directly compatible with various network APIs. Also, for reference, Guava Bloom filter implementation uses streams.

There's a bit of code duplication as the result. Sadly, there's no standard class to wrap ByteBuffer in a stream, and pulling in an external dependency seems like an overkill here.

There are already methods operating on ByteBuffer, however versions
taking streams allow to avoid data copying, and more directly compatible
with various network APIs. Also, for reference, Guava Bloom filter implementation
uses streams.

There's a bit of code duplication as the result. Sadly, there's no standard
class to wrap ByteBuffer in a stream, and pulling in an external dependency
seems like an overkill here.
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.

1 participant