MemoryStream optimizations

This commit is contained in:
Bond_009
2020-08-07 17:38:01 +02:00
committed by Bond-009
parent 75bb127599
commit 371a09c60b
7 changed files with 36 additions and 26 deletions

View File

@@ -95,7 +95,7 @@ namespace Emby.Server.Implementations.Serialization
/// <returns>System.Object.</returns>
public object DeserializeFromBytes(Type type, byte[] buffer)
{
using (var stream = new MemoryStream(buffer))
using (var stream = new MemoryStream(buffer, 0, buffer.Length, false, true))
{
return DeserializeFromStream(type, stream);
}