avoid double compressing zstd zip entries

This commit is contained in:
CasualPokePlayer 2024-08-04 15:08:53 -07:00
parent 7ebb89fec9
commit a675e882fe
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ namespace BizHawk.Client.Common
public void WriteItem(string name, Action<Stream> callback, bool zstdCompress)
{
using var stream = _archive.CreateEntry(name, _level).Open();
// don't compress with deflate if we're already compressing with zstd
// this won't produce meaningful compression, and would just be a timesink
using var stream = _archive.CreateEntry(name, zstdCompress ? CompressionLevel.NoCompression : _level).Open();
if (zstdCompress)
{