diff --git a/Thrive.csproj b/Thrive.csproj index d4eb4fe7661..c3ed0f15052 100644 --- a/Thrive.csproj +++ b/Thrive.csproj @@ -639,7 +639,7 @@ 4.5.0 - 1.3.3 + 1.4.2 1.1.1 diff --git a/src/saving/Save.cs b/src/saving/Save.cs index 6de158be83c..9a1daf9aefc 100644 --- a/src/saving/Save.cs +++ b/src/saving/Save.cs @@ -1,8 +1,8 @@ using System; using System.IO; +using System.IO.Compression; using System.Text; using Godot; -using ICSharpCode.SharpZipLib.GZip; using ICSharpCode.SharpZipLib.Tar; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -249,7 +249,7 @@ private static void WriteDataToSaveFile(string target, string justInfo, string s } using var fileStream = new GodotFileStream(file); - using Stream gzoStream = new GZipOutputStream(fileStream); + using Stream gzoStream = new GZipStream(fileStream, CompressionLevel.Optimal); using var tar = new TarOutputStream(gzoStream, Encoding.UTF8); TarHelper.OutputEntry(tar, SAVE_INFO_JSON, Encoding.UTF8.GetBytes(justInfo)); @@ -356,7 +356,7 @@ private static (string? InfoStr, string? SaveStr, byte[]? Screenshot) LoadDataFr throw new ArgumentException("couldn't open the file for reading"); using var stream = new GodotFileStream(reader); - using Stream gzoStream = new GZipInputStream(stream); + using Stream gzoStream = new GZipStream(stream, CompressionMode.Decompress); using var tar = new TarInputStream(gzoStream, Encoding.UTF8); TarEntry tarEntry; diff --git a/src/thriveopedia/fossilisation/FossilisedSpecies.cs b/src/thriveopedia/fossilisation/FossilisedSpecies.cs index 46d945207d0..0718e37303a 100644 --- a/src/thriveopedia/fossilisation/FossilisedSpecies.cs +++ b/src/thriveopedia/fossilisation/FossilisedSpecies.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.IO; +using System.IO.Compression; using System.Linq; using System.Text; using Godot; -using ICSharpCode.SharpZipLib.GZip; using ICSharpCode.SharpZipLib.Tar; using Newtonsoft.Json; using Directory = Godot.Directory; @@ -175,7 +175,7 @@ private static void WriteDataToFossilFile(string target, string justInfo, string } using var fileStream = new GodotFileStream(file); - using Stream gzoStream = new GZipOutputStream(fileStream); + using Stream gzoStream = new GZipStream(fileStream, CompressionLevel.Optimal); using var tar = new TarOutputStream(gzoStream, Encoding.UTF8); TarHelper.OutputEntry(tar, SAVE_INFO_JSON, Encoding.UTF8.GetBytes(justInfo)); @@ -240,7 +240,7 @@ private static (string? Info, string? Fossil, byte[]? PreviewImageData) LoadData throw new ArgumentException("couldn't open the file for reading"); using var stream = new GodotFileStream(reader); - using Stream gzoStream = new GZipInputStream(stream); + using Stream gzoStream = new GZipStream(stream, CompressionMode.Decompress); using var tar = new TarInputStream(gzoStream, Encoding.UTF8); TarEntry tarEntry;