<PackageReference Include="Google.Protobuf" Version="3.34.0" />

Google.Protobuf.UnsafeByteOperations

public static class UnsafeByteOperations
Provides a number of unsafe byte operations to be used by advanced applications with high performance requirements. These methods are referred to as "unsafe" due to the fact that they potentially expose the backing buffer of a ByteString to the application.
public static ByteString UnsafeWrap(ReadOnlyMemory<byte> bytes)

Constructs a new ByteString from the given bytes. The bytes are not copied, and must not be modified while the ByteString is in use.