pjfanning opened a new pull request, #1135: URL: https://github.com/apache/pekko-http/pull/1135
Code looks like it should be ok to use toArrayUnsafe, that no other code should be able to modify the array data. toArrayUnsafe() on ByteString is only really helpful for ByteStrings directly based by 1 byte array with no offset. Otherwise, it gives you the same as toArray. I don't know if the costs outweigh the benefits but if used an InflaterInputStream, we can get an InputStream from a ByteString that can avoid array copies for all ByteString types - but with extra expense to manage the stream, etc. `new InflaterInputStream(byteString.asInputStream)` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
