Files
ben marsh d4f085fa25 Horde: Rename namespaces to match project folders.
[CL 34573501 by ben marsh in ue5-main branch]
2024-06-21 15:57:01 -04: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);
}
}
}