Skip to content

Conversation

amiru3f
Copy link
Contributor

@amiru3f amiru3f commented Dec 22, 2022

Fast and optimized serializer MemoryPack implemented as an extension

@catcherwong
Copy link
Member

Sorry, I'm a little busy these days. I'll review this PR in three days.


public T Deserialize<T>(byte[] bytes) => MemoryPackSerializer.Deserialize<T>(bytes, _memoryPackSerializerOptions);
public object Deserialize(byte[] bytes, Type type) => MemoryPackSerializer.Deserialize(type, bytes, _memoryPackSerializerOptions);
public object DeserializeObject(ArraySegment<byte> value) => throw new NotImplementedException("this is not supported in MemoryPack serializer");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MemoryPack don't support this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it does not, it needs the type to be deserialized to. It can't handle dynamic or non memoryPackable objects.

@catcherwong catcherwong merged commit db8c5af into dotnetcore:dev Dec 31, 2022
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

Successfully merging this pull request may close these issues.

2 participants