Remove unused decompress methods.

This commit is contained in:
Ahmed Yasin Koculu
2026-06-13 07:57:12 +02:00
parent 7833764b59
commit b1b41aef5e
4 changed files with 1 additions and 36 deletions
@@ -1,5 +1,4 @@
using System.IO.Compression;
using ZoneTree.AbstractFileStream;
namespace ZoneTree.Compression;
@@ -22,17 +21,6 @@ public static class BrotliDataCompression
return compressed.AsMemory(0, compressedLength);
}
public static byte[] Decompress(Memory<byte> compressedBytes)
{
using var pin = compressedBytes.Pin();
using var msInput = compressedBytes.ToReadOnlyStream(pin);
using var msOutput = new MemoryStream();
using var gzs = new BrotliStream(msInput, CompressionMode.Decompress);
gzs.CopyTo(msOutput);
var decompressed = msOutput.ToArray();
return decompressed;
}
public static byte[] Decompress(Memory<byte> compressedBytes, int decompressedLength)
{
var decompressed = new byte[decompressedLength];
@@ -15,17 +15,6 @@ public static class GZipDataCompression
return msOutput.ToArray();
}
public static byte[] Decompress(Memory<byte> compressedBytes)
{
using var pin = compressedBytes.Pin();
using var msInput = compressedBytes.ToReadOnlyStream(pin);
using var msOutput = new MemoryStream(compressedBytes.Length);
using var gzs = new GZipStream(msInput, CompressionMode.Decompress);
gzs.CopyTo(msOutput);
var decompressed = msOutput.ToArray();
return decompressed;
}
public static byte[] Decompress(Memory<byte> compressedBytes, int decompressedLength)
{
var decompressed = new byte[decompressedLength];
@@ -9,11 +9,6 @@ public static class LZ4DataCompression
return LZ4Pickler.Pickle(bytes.Span, (LZ4Level)level);
}
public static byte[] Decompress(Memory<byte> compressedBytes)
{
return LZ4Pickler.Unpickle(compressedBytes.Span);
}
public static byte[] Decompress(Memory<byte> compressedBytes, int decompressedLength)
{
var bytes = new byte[decompressedLength];
@@ -23,6 +18,6 @@ public static class LZ4DataCompression
public static int GetDecompressedLength(Memory<byte> compressedBytes)
{
return checked((int)LZ4Pickler.UnpickledSize(compressedBytes.Span));
return checked(LZ4Pickler.UnpickledSize(compressedBytes.Span));
}
}
@@ -18,13 +18,6 @@ public static class ZstdDataCompression
return compressed.AsMemory(0, compressedLength);
}
public static byte[] Decompress(Memory<byte> compressedBytes)
{
var decompressedLength = checked((int)Decompressor
.GetDecompressedSize(compressedBytes.Span));
return Decompress(compressedBytes, decompressedLength);
}
public static byte[] Decompress(Memory<byte> compressedBytes, int decompressedLength)
{
var decompressed = new byte[decompressedLength];