Move lib classes; Replace brotli decompressor

This commit is contained in:
VaDiM
2026-06-06 17:53:38 +03:00
parent 02a288894d
commit cce02d22c8
34 changed files with 17 additions and 10 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
using BundleCompression.Lzma;
using BundleCompression.Oodle;
using AssetStudio.Libs.Lzma;
using AssetStudio.Libs.Oodle;
using K4os.Compression.LZ4;
using System;
using System.IO;
using System.Text.RegularExpressions;
using K4os.Compression.LZ4;
using ZstdSharp;
namespace AssetStudio
+9 -2
View File
@@ -1,9 +1,12 @@
using Org.Brotli.Dec;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
#if NETFRAMEWORK
using AssetStudio.Libs.Brotli;
#endif
namespace AssetStudio
{
public static class ImportHelper
@@ -81,7 +84,11 @@ namespace AssetStudio
using (reader)
{
var stream = new MemoryStream();
#if NETFRAMEWORK
using (var brotliStream = new BrotliInputStream(reader.BaseStream))
#else
using (var brotliStream = new BrotliStream(reader.BaseStream, CompressionMode.Decompress))
#endif
{
brotliStream.CopyTo(stream);
}
@@ -1,9 +1,9 @@
/* Copyright 2015 Google Inc. All Rights Reserved.
/* Copyright 2015 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
namespace Org.Brotli.Dec
namespace AssetStudio.Libs.Brotli
{
/// <summary>
/// <see cref="System.IO.Stream"/>
@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
using AssetStudio.PInvoke;
#endif
namespace BundleCompression.Oodle
namespace AssetStudio.Libs.Oodle
{
public static class OodleLZ
{
@@ -1,8 +1,8 @@
using System;
using System;
using System.IO;
using SevenZip.Compression.LZMA;
namespace BundleCompression.Lzma
namespace AssetStudio.Libs.Lzma
{
public static class SevenZipLzma
{