mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-17 03:38:48 -05:00
Move lib classes; Replace brotli decompressor
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -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
|
||||||
{
|
{
|
||||||
+2
-2
@@ -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
|
||||||
{
|
{
|
||||||
Reference in New Issue
Block a user