-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Labels
Description
What is your use-case and why do you need this feature?
I want to append additional data to the byte array generated by encodeToByteArray
without having to copy all data into a larger array unnecessarily. I need to send this ByteArray over websockets but not all data that needs to be sent can be serialized.
Describe the solution you'd like
Option 1
Add additional parameters to encodeToByteArray
to request empty space at the beginning and end of the array the this function instantiates.
Option 2
Receive a lambda that received the required space and returns a ByteArray on which to write serialized data and the starting index.