Skip to content

Support for ReadOnlyMemory<byte> #259

@AlgorithmsAreCool

Description

@AlgorithmsAreCool

I noticed that there is serializer support for byte[], but having support for ROM<byte> would help a few cases, notably on the serialization side, i could rent the buffers, fill them with data and then serialize them and returns the buffers. If i try that with an array, i might get back a oversized array and then serialize extra data.

On the deserialization side, the proxy could just allocate arrays to create the ROMs and that would be fine. A more advanced usecase for way down the road would be the abiliity to specify buffer allocators to the serde infra.

But as for the ROM support, could i raise a PR for it if you think a built in proxy is a good idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions