-
Notifications
You must be signed in to change notification settings - Fork 59
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
Missing API: zero-copy wrapping of ByteArray with Source. #166
Comments
I think, that wrapping |
I would also love to see this added, and I would add that an API for turning |
In fact, you can write something like:
|
Thanks for this! I wasn't aware, but that looks quite promising. I will check if this solves my problem and report back. |
There was an intention to avoid explicitly mentioning the unsafe API, so nobody would find it until that API is really needed. But it seems like we made it too hidden. :) |
I put my thoughts in #259, because I don't want to pollute this issue any further (it's related but different) |
After reading the #135 and #311 , I'm not sure, is there something around wrapping a ByteArray as a |
@Chuckame please check
|
Thanks, so is this open issue still relevant ? |
I'll close it once #334 will be merged |
Oh sorry I just discovered that it's from a PR 😄 Will you release after this PR merged ? Or will you wait for the 5/5 PR merged ? |
The plan was to merge PRs "2/5" and "3/5", fix a few issues with segment pools and release it without "4/5" and "5/5" (which could be merged and released later). |
Ok thanks. Is there some official roadmap and milestones with releasing dates ? (not expecting exact vision, just to know if it's about days/week, or for the end of the year — or more) In any case, I'll follow the PRs. It's to see if I can wait a bit to use kotlinx-io before releasing our v2. |
The unsafe API, at least aforementioned part, will be released before July the 15th. |
@Chuckame, the API was included in the recent |
3 days earlier, what a boss! Thanks, I'll test it 🚀 |
There are several cases in binary parsing, where one needs to wrap a
ByteArray
with an interface likeSource
and read from it sequentially. It should be possible by using aBuffer
with a singleSegment
, butSegment
API is private.There should probably be two versions of the API: read/write and read-only.
The text was updated successfully, but these errors were encountered: