Skip to content

Commit

Permalink
return the compression
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanBout committed Nov 28, 2024
1 parent fb52d27 commit 396d333
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions SimpleCDN/Helpers/GZipHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ public class GZipHelpers
/// <returns><see langword="false"/> if the compressed data is not smaller than the original data. Otherwise, <see langword="true"/></returns>
public static bool TryCompress(ref Span<byte> data)
{
return false;
#pragma warning disable CS0162 // Unreachable code detected. Caching is disabled for now, but the code is left here for future reference.
using var memoryStream = new MemoryStream();
using (var gzipStream = new GZipStream(memoryStream, CompressionMode.Compress, true))
{
Expand All @@ -28,7 +26,6 @@ public static bool TryCompress(ref Span<byte> data)
data = data[..read];

return true;
#pragma warning restore CS0162 // Unreachable code detected
}

public static byte[] Decompress(byte[] data)
Expand Down

0 comments on commit 396d333

Please sign in to comment.