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

Switch buffers over to use the IBufferWriter<byte> and IBufferReader<byte> APIs #5

Open
chandler14362 opened this issue Mar 18, 2021 · 0 comments

Comments

@chandler14362
Copy link
Owner

chandler14362 commented Mar 18, 2021

This opens a lot of new possibilities for what can be accepted by the serialize/deserialize APIs. These APIs are necessary for working with very large data. The serialize state API will be changed to accept a ReadOnlySequence<byte> from ReadOnlySpan<byte>. It's underlying implementation will take advantage of the high-performance System.IO.Pipelines Pipe API, the pipe will be cleaned up once the method accepting the state and ReadOnlySequence<byte> is called. There will also be a serialize API accepting the object and an IBufferWriter<byte>. This API will return void and assume the memory management be handled by the code calling the method. These changes will remove the ability to serialize directly to the stack (unless another solution is made for that specifically). Serialization code will need to be changed to a multi-writer design to pull off the versioning properly, the bookmarks will no longer be usable.

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

No branches or pull requests

1 participant