diff --git a/src/ZoneTree/Compression/ZstdDataCompression.cs b/src/ZoneTree/Compression/ZstdDataCompression.cs index 79a30d8..dc70ac7 100644 --- a/src/ZoneTree/Compression/ZstdDataCompression.cs +++ b/src/ZoneTree/Compression/ZstdDataCompression.cs @@ -1,4 +1,4 @@ -using ZstdNet; +using ZstdSharp; namespace ZoneTree.Compression; @@ -6,8 +6,7 @@ public static class ZstdDataCompression { public static Memory Compress(Memory bytes, int level) { - using var options = new CompressionOptions(level); - using var compressor = new Compressor(options); + using var compressor = new Compressor(level); return compressor.Wrap(bytes.Span).ToArray(); } @@ -21,7 +20,7 @@ public static class ZstdDataCompression { var decompressed = new byte[decompressedLength]; using var decompressor = new Decompressor(); - decompressor.Unwrap(compressedBytes.Span, decompressed, 0); + decompressor.Unwrap(compressedBytes.Span, decompressed.AsSpan()); return decompressed; } } diff --git a/src/ZoneTree/ZoneTree.csproj b/src/ZoneTree/ZoneTree.csproj index 5d3fba7..a39d44d 100644 --- a/src/ZoneTree/ZoneTree.csproj +++ b/src/ZoneTree/ZoneTree.csproj @@ -46,6 +46,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - +