Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ByteString unsafe methods where it is ok #4021

Merged
merged 4 commits into from
Sep 6, 2024

Conversation

pjfanning
Copy link
Contributor

@pjfanning pjfanning commented Sep 6, 2024

Pekko/Akka ByteString supports unsafe methods to create ByteStrings without cloning arrays or output the underlying array data (again without cloning). This is ok if no the other code that works with the arrays isn't modifying the array data.

Pekko 1.1 also has a ByteString.asInputStream method which is more efficient than getting an array and wrapping as ByteArrayInputStream.

@adamw adamw merged commit f383d41 into softwaremill:master Sep 6, 2024
26 checks passed
@adamw
Copy link
Member

adamw commented Sep 6, 2024

Thank you!

@pjfanning pjfanning deleted the bytestring-unsafe branch October 1, 2024 23:21
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.

2 participants