From 9efb97b7fb0105359a32c5306982e23b19871f7c Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 12 Apr 2026 17:21:07 +0100 Subject: [PATCH] Refactor LZMA stream initialization to use factory method --- Aaru.Compression/LZMA.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aaru.Compression/LZMA.cs b/Aaru.Compression/LZMA.cs index 16f5d5510..385960ed4 100644 --- a/Aaru.Compression/LZMA.cs +++ b/Aaru.Compression/LZMA.cs @@ -72,7 +72,7 @@ public partial class LZMA } using var cmpMs = new MemoryStream(source); - using var lzmaBlock = new LzmaStream(properties, cmpMs); + using var lzmaBlock = LzmaStream.Create(properties, cmpMs); lzmaBlock.EnsureRead(destination, 0, destination.Length); return destination.Length; @@ -118,7 +118,7 @@ public partial class LZMA var lzmaEncoderProperties = new LzmaEncoderProperties(true, (int)dictSize, fb); - using var lzmaStream = new LzmaStream(lzmaEncoderProperties, false, new MemoryStream(destination)); + using var lzmaStream = LzmaStream.Create(lzmaEncoderProperties, false, new MemoryStream(destination)); lzmaStream.Write(source, 0, source.Length); properties = new byte[lzmaStream.Properties.Length];