From fe87204c1e33cabcfdd842de20d1b3bed4237ff1 Mon Sep 17 00:00:00 2001 From: ArchLeaders Date: Sun, 14 Jan 2024 23:57:57 -0800 Subject: [PATCH] Cleanup zstd processor --- src/TotkZstd.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/TotkZstd.cs b/src/TotkZstd.cs index 35b2433..0f040c2 100644 --- a/src/TotkZstd.cs +++ b/src/TotkZstd.cs @@ -60,19 +60,17 @@ public void Reprocess(IEditorFile handle) WriteEditorFile baseWrite = handle.Write; handle.Write = (data) => { if (handle.Name.EndsWith(".bcett.byml.zs")) { - data = _bcettCompressor.Wrap(data); + baseWrite(_bcettCompressor.Wrap(data)); } else if (handle.Name.EndsWith(".pack.zs")) { - data = _packCompressor.Wrap(data); + baseWrite(_packCompressor.Wrap(data)); } else if (handle.Name.EndsWith(".rsizetable.zs")) { - data = _defaultCompressor.Wrap(data); + baseWrite(_defaultCompressor.Wrap(data)); } else { - data = _commonCompressor.Wrap(data); + baseWrite(_commonCompressor.Wrap(data)); } - - baseWrite(data); }; }