Files
UnrealEngine/Engine/Source/Programs/Horde/HordeServer/Utilities/ZstdCompressionProvider.cs
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

26 lines
562 B
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
using Microsoft.AspNetCore.ResponseCompression;
namespace HordeServer.Utilities
{
/// <summary>
/// Compression provider for zstd responses
/// </summary>
class ZstdCompressionProvider : ICompressionProvider
{
/// <inheritdoc/>
public string EncodingName => "zstd";
/// <inheritdoc/>
public bool SupportsFlush => true;
/// <inheritdoc/>
public Stream CreateStream(Stream outputStream)
{
return new ZstdSharp.CompressionStream(outputStream, leaveOpen: false);
}
}
}