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 AssetStudio.Libs.Lzma;
using BundleCompression.Oodle; using AssetStudio.Libs.Oodle;
using K4os.Compression.LZ4;
using System; using System;
using System.IO; using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using K4os.Compression.LZ4;
using ZstdSharp; using ZstdSharp;
namespace AssetStudio 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;
using System.IO.Compression; using System.IO.Compression;
using System.Linq; using System.Linq;
#if NETFRAMEWORK
using AssetStudio.Libs.Brotli;
#endif
namespace AssetStudio namespace AssetStudio
{ {
public static class ImportHelper public static class ImportHelper
@@ -81,7 +84,11 @@ namespace AssetStudio
using (reader) using (reader)
{ {
var stream = new MemoryStream(); var stream = new MemoryStream();
#if NETFRAMEWORK
using (var brotliStream = new BrotliInputStream(reader.BaseStream)) using (var brotliStream = new BrotliInputStream(reader.BaseStream))
#else
using (var brotliStream = new BrotliStream(reader.BaseStream, CompressionMode.Decompress))
#endif
{ {
brotliStream.CopyTo(stream); 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. Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/ */
namespace Org.Brotli.Dec namespace AssetStudio.Libs.Brotli
{ {
/// <summary> /// <summary>
/// <see cref="System.IO.Stream"/> /// <see cref="System.IO.Stream"/>
@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
using AssetStudio.PInvoke; using AssetStudio.PInvoke;
#endif #endif
namespace BundleCompression.Oodle namespace AssetStudio.Libs.Oodle
{ {
public static class OodleLZ public static class OodleLZ
{ {
@@ -1,8 +1,8 @@
using System; using System;
using System.IO; using System.IO;
using SevenZip.Compression.LZMA; using SevenZip.Compression.LZMA;
namespace BundleCompression.Lzma namespace AssetStudio.Libs.Lzma
{ {
public static class SevenZipLzma public static class SevenZipLzma
{ {