The Pekko ByteString uses a byte array as backing.
Netty has support for DirectByteBufs (ByteBufs that use an off-heap ByteBuffer - aka Direct ByteBuffer).
pekko-actor already has DirectByteBufferPool - so in theory, we can reuse the direct ByteBuffers too.
ByteStrings (a ByteString that is a concat of multiple ByteStrings) should hopefully be able to work with DirectByteStrings with little or no changes.
When ByteStrings are compacted, we might want to be able to choose if the compacted ByteString is byte array backed or Direct ByteBuffer backed.
wdyt @He-Pin ?