DotNext.IO by .NET Foundation and Contributors

<PackageReference Include="DotNext.IO" Version="4.6.1" />

 Serializable

public static class Serializable
Provides extension methods for decoding ISerializable<T> from various sources.
public static ValueTask<TObject> ReadFromAsync<TObject>(this Stream input, Memory<byte> buffer, CancellationToken token = default) where TObject : ISerializable<TObject>

Deserializes the object from the stream.

public static ValueTask<TObject> ReadFromAsync<TObject>(this Stream input, int bufferSize = 128, CancellationToken token = default) where TObject : ISerializable<TObject>

Deserializes the object from the stream.

public static ValueTask<TObject> ReadFromAsync<TObject>(this PipeReader reader, CancellationToken token = default) where TObject : ISerializable<TObject>

Deserializes the object from the pipe.

public static ValueTask<TOutput> TransformAsync<TInput, TOutput>(this TInput input, CancellationToken token = default) where TInput : IDataTransferObject where TOutput : ISerializable<TOutput>

Transforms one object into another object.