少年修仙传客户端基础资源
client_Wu Xijin
2018-11-02 b45dd7121d12c331e98e5fe3ffbb547d9d0d81ad
Merge branch 'DownLoad'
3个文件已修改
55个文件已添加
1911 ■■■■■ 已修改文件
Assets/Editor/Tool/ClientPackage.cs 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/ClientPackageExtension.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/armeabi-v7a/liblzma.so 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/armeabi-v7a/liblzma.so.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/x86/liblzma.so 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/x86/liblzma.so.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/x86_64.meta 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/x86_64/liblzma.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/Android/libs/x86_64/liblzma.zip.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/SevenZip.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/SevenZip/lzma.cs 839 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/SevenZip/lzma.cs.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/libbrotli.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/libfastlz.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblz4.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-aggressive-bitcode.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-aggressive-bitcode.zip.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-fastest-smallest-bitcode.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-fastest-smallest-bitcode.zip.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-tvOS-bitcode.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-tvOS-bitcode.zip.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-watchOS-bitcode.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.a-watchOS-bitcode.zip.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/liblzma.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/bitcode/libzipw.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a-simulator.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a-simulator.zip.meta 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.aggresive.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.aggresive.zip.meta 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.fastest-smallest.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.fastest-smallest.zip.meta 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.fastest.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.fastest.zip.meta 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.a.meta 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.smallest.zip 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/iOS/liblzma.smallest.zip.meta 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle.meta 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle/Contents.meta 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle/Contents/Info.plist 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle/Contents/Info.plist.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle/Contents/MacOS.meta 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle/Contents/MacOS/liblzma 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/liblzma.bundle/Contents/MacOS/liblzma.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86.meta 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86/liblzma.dll 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86/liblzma.dll.meta 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86/liblzma.so 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86/liblzma.so.meta 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86_64.meta 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86_64/liblzma.dll 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86_64/liblzma.dll.meta 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86_64/liblzma.so 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Plugins/x86_64/liblzma.so.meta 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Resources/Config/PriorBundle.txt 234 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/test7zip.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/test7zip.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/ClientPackage.cs
@@ -22,8 +22,13 @@
    }
    public static bool obfuscatorEnabled {
        get { return LocalSave.GetBool("obfuscatorEnabled",false); }
        get { return LocalSave.GetBool("obfuscatorEnabled", false); }
        set { LocalSave.SetBool("obfuscatorEnabled", value); }
    }
    public static int AssetPrior {
        get { return LocalSave.GetInt("HalfAssetPrior", 1); }
        set { LocalSave.SetInt("HalfAssetPrior", value); }
    }
    static string ANDROID_PLUGIN_PATH = Application.dataPath + "/Plugins/Android";
@@ -130,11 +135,14 @@
        if (halfPackages.Count > 0)
        {
            Config.Instance.LoadPriorBundleConfig();
            FileExtersion.DirectoryCopy(_assetBundlePath, ResourcesPath.Instance.StreamingAssetPath);
            var files = new List<FileInfo>();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, "mob"), files);
            foreach (var file in files)
            var fromFiles = new List<FileInfo>();
            FileExtersion.GetAllDirectoryFileInfos(_assetBundlePath, fromFiles);
            var excludeFileFullNames = new List<string>();
            var tempFiles = new List<FileInfo>();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/mob"), tempFiles);
            foreach (var file in tempFiles)
            {
                var extersion = Path.GetExtension(file.FullName);
                var fileName = Path.GetFileName(file.FullName);
@@ -143,15 +151,16 @@
                    fileName = fileName.Replace(extersion, "");
                }
                if (!PriorBundleConfig.mobs.Contains(fileName))
                var prior = PriorBundleConfig.GetAssetPrior(AssetVersion.AssetCategory.Mob, fileName);
                if (prior > AssetPrior)
                {
                    File.Delete(file.FullName);
                    excludeFileFullNames.Add(file.FullName);
                }
            }
            files.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, "maps"), files);
            foreach (var file in files)
            tempFiles.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/maps"), tempFiles);
            foreach (var file in tempFiles)
            {
                var extersion = Path.GetExtension(file.FullName);
                var fileName = Path.GetFileName(file.FullName);
@@ -160,15 +169,16 @@
                    fileName = fileName.Replace(extersion, "");
                }
                if (!PriorBundleConfig.scenes.Contains(fileName))
                var prior = PriorBundleConfig.GetAssetPrior(AssetVersion.AssetCategory.Scene, fileName);
                if (prior > AssetPrior)
                {
                    File.Delete(file.FullName);
                    excludeFileFullNames.Add(file.FullName);
                }
            }
            files.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, "audio"), files);
            foreach (var file in files)
            tempFiles.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/audio"), tempFiles);
            foreach (var file in tempFiles)
            {
                var extersion = Path.GetExtension(file.FullName);
                var fileName = Path.GetFileName(file.FullName);
@@ -177,15 +187,16 @@
                    fileName = fileName.Replace(extersion, "");
                }
                if (!PriorBundleConfig.audios.Contains(fileName))
                var prior = PriorBundleConfig.GetAssetPrior(AssetVersion.AssetCategory.Audio, fileName);
                if (prior > AssetPrior)
                {
                    File.Delete(file.FullName);
                    excludeFileFullNames.Add(file.FullName);
                }
            }
            files.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, "effect"), files);
            foreach (var file in files)
            tempFiles.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/effect"), tempFiles);
            foreach (var file in tempFiles)
            {
                var extersion = Path.GetExtension(file.FullName);
                var fileName = Path.GetFileName(file.FullName);
@@ -194,12 +205,63 @@
                    fileName = fileName.Replace(extersion, "");
                }
                if (!PriorBundleConfig.effects.Contains(fileName))
                var prior = PriorBundleConfig.GetAssetPrior(AssetVersion.AssetCategory.Effect, fileName);
                if (prior > AssetPrior)
                {
                    File.Delete(file.FullName);
                    excludeFileFullNames.Add(file.FullName);
                }
            }
            tempFiles.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/ui/sprite"), tempFiles);
            foreach (var file in tempFiles)
            {
                var fileName = Path.GetFileName(file.FullName);
                if (fileName == "loadingbg")
                {
                    excludeFileFullNames.Add(file.FullName);
                }
            }
            for (int i = fromFiles.Count - 1; i >= 0; i--)
            {
                var item = fromFiles[i];
                if (excludeFileFullNames.Contains(item.FullName))
                {
                    fromFiles.RemoveAt(i);
                }
            }
            var totalCount = fromFiles.Count;
            var completeCount = 0;
            foreach (var item in fromFiles)
            {
                var directory = Path.GetDirectoryName(item.FullName);
                if (!Directory.Exists(directory))
                {
                    Directory.CreateDirectory(directory);
                }
                var relativePath = FileExtersion.GetFileRelativePath(_assetBundlePath, item.FullName);
                var to = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, relativePath);
#if UNITY_ANDROID
                var extension = Path.GetExtension(item.FullName);
                if (extension == ".meta")
                {
                    continue;
                }
                to = to + ".7z";
                SevenZipUtility.Compress(item.FullName, to);
                UnityEditor.EditorUtility.DisplayProgressBar("正在压缩资源", item.Name, (float)completeCount / totalCount);
#elif UNITY_IOS
                File.Copy(item.FullName,to,true);
#endif
                completeCount++;
            }
            EditorUtility.ClearProgressBar();
            for (int i = 0; i < halfPackages.Count; i++)
            {
#if UNITY_ANDROID
@@ -277,7 +339,7 @@
        PlayerSettings.Android.keystorePass = versionConfig.keystorePassword;
        PlayerSettings.Android.keyaliasName = versionConfig.keystoreAlias;
        PlayerSettings.Android.keyaliasPass = versionConfig.keystoreAliasPassword;
        PlayerSettings.Android.targetSdkVersion = AndroidSdkVersions.AndroidApiLevel22;
        // PlayerSettings.Android.targetSdkVersion = AndroidSdkVersions.AndroidApiLevel22;
        PlayerSettings.Android.bundleVersionCode = VersionConfig.GetVersionNumber(versionConfig.version);
        PlayerSettings.enableInternalProfiler = _development;
@@ -292,7 +354,7 @@
        FileExtersion.DirectoryCopy(StringUtility.Contact(_sdkPath, "/ChannelDiff/Android/", versionConfig.appId), ANDROID_PLUGIN_PATH);
        var option = AssetDatabase.LoadAssetAtPath<Options>("Assets/Editor/Beebyte/Obfuscator/ObfuscatorOptions.asset");
        if (option!=null)
        if (option != null)
        {
            option.enabled = obfuscatorEnabled;
            EditorUtility.SetDirty(option);
Assets/Editor/Tool/ClientPackageExtension.cs
@@ -16,6 +16,7 @@
            try
            {
                Debug.LogFormat("从命令行中解析出来的SDKPATH 是:{0}", parameters.sdkPath);
                ClientPackage.AssetPrior = 1;
                ClientPackage.BuildPublishers(parameters.sdkPath, parameters.assetbundlePath, parameters.outputPath, parameters.publishers, parameters.buildIndex, false, false);
            }
            catch (Exception ex)
Assets/Plugins/Android/libs/armeabi-v7a/liblzma.so
Binary files differ
Assets/Plugins/Android/libs/armeabi-v7a/liblzma.so.meta
New file
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 47f1efaba9ae5384e860af5a2f4b81f4
DefaultImporter:
  userData:
Assets/Plugins/Android/libs/x86/liblzma.so
Binary files differ
Assets/Plugins/Android/libs/x86/liblzma.so.meta
New file
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 30173cd337b2c3342807248d739cfef5
DefaultImporter:
  userData:
Assets/Plugins/Android/libs/x86_64.meta
New file
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1c82f02f593b1ea46b1f621db7963d42
folderAsset: yes
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/Android/libs/x86_64/liblzma.zip
Binary files differ
Assets/Plugins/Android/libs/x86_64/liblzma.zip.meta
New file
@@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: b33b02668b8329341b048c388739b940
DefaultImporter:
  userData:
Assets/Plugins/SevenZip.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 12b6aa1b020583d4da0e4a2bf52bb7ff
folderAsset: yes
timeCreated: 1541063894
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/SevenZip/lzma.cs
New file
@@ -0,0 +1,839 @@
using System;
using System.Runtime.InteropServices;
using UnityEngine;
using System.Collections.Generic;
using System.IO;
#if (UNITY_WSA_8_1 ||  UNITY_WP_8_1 || UNITY_WINRT_8_1) && !UNITY_EDITOR
 using File = UnityEngine.Windows.File;
 #else
 using File = System.IO.File;
 #endif
#if NETFX_CORE
    #if UNITY_WSA_10_0
        using System.IO.IsolatedStorage;
        using static System.IO.Directory;
        using static System.IO.File;
        using static System.IO.FileStream;
    #endif
#endif
public class lzma {
    //if you want to be able to call the functions: get7zinfo, get7zSize, decode2Buffer from a thread set this string before to the Application.persistentDataPath !
    public static string persitentDataPath="";
#if !(UNITY_WSA || UNITY_WP_8_1) || UNITY_EDITOR
    internal static int[] props = new int [7];
    internal static bool defaultsSet = false;
    //0 = level, /* 0 <= level <= 9, default = 5 */
    //1 = dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */
    //2 = lc, /* 0 <= lc <= 8, default = 3  */
    //3 = lp, /* 0 <= lp <= 4, default = 0  */
    //4 = pb, /* 0 <= pb <= 4, default = 2  */
    //5 = fb,  /* 5 <= fb <= 273, default = 32 */
    //6 = numThreads /* 1 or 2, default = 2 */
    //A function that sets the compression properties for the lzma compressor. Will affect the lzma alone file and the lzma buffer compression.
    //A simple usage of this function is to call it only with the 1st parameter that sets the compression level: setProps(9);
    //
    //Multithread safe advice: call this function before starting any thread operations !!!
    public static void setProps(int level = 5, int dictSize = 16777216, int lc = 3, int lp = 0, int pb = 2, int fb = 32, int numThreads = 2) {
        defaultsSet = true;
        props[0] = level;
        props[1] = dictSize;
        props[2] = lc;
        props[3] = lp;
        props[4] = pb;
        props[5] = fb;
        props[6] = numThreads;
    }
#endif
#if (UNITY_IOS || UNITY_WEBGL || UNITY_IPHONE) && !UNITY_EDITOR
        #if(!UNITY_WEBGL)
            [DllImport("__Internal")]
            public static extern int lsetPermissions(string filePath, string _user, string _group, string _other);
            [DllImport("__Internal")]
            private static extern int decompress7zip(string filePath, string exctractionPath, bool fullPaths,  string entry, IntPtr progress, IntPtr FileBuffer, int FileBufferLength);
        #endif
        [DllImport("__Internal")]
        private static extern int decompress7zip2(string filePath, string exctractionPath, bool fullPaths, string entry, IntPtr progress, IntPtr FileBuffer, int FileBufferLength);
        [DllImport("__Internal")]
        private static extern int _getSize(string filePath, string tempPath, IntPtr FileBuffer, int FileBufferLength);
        [DllImport("__Internal")]
        internal static extern int lzmaUtil(bool encode, string inPath, string outPath, IntPtr Props);
        [DllImport("__Internal")]
        internal static extern int decode2Buf(string filePath, string entry,  IntPtr buffer, IntPtr FileBuffer, int FileBufferLength);
        [DllImport("__Internal")]
        internal static extern void _releaseBuffer(IntPtr buffer);
        [DllImport("__Internal")]
        internal static extern IntPtr Lzma_Compress( IntPtr buffer, int bufferLength, bool makeHeader, ref int v, IntPtr Props);
        [DllImport("__Internal")]
        internal static extern int Lzma_Uncompress( IntPtr buffer, int bufferLength, int uncompressedSize,  IntPtr outbuffer,bool useHeader);
#endif
#if UNITY_5_4_OR_NEWER
    #if (UNITY_ANDROID || UNITY_STANDALONE_LINUX) && (!UNITY_EDITOR || UNITY_EDITOR_LINUX)
        private const string libname = "lzma";
    #elif UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
        private const string libname = "liblzma";
    #endif
#else
    #if (UNITY_ANDROID || UNITY_STANDALONE_LINUX) && !UNITY_EDITOR
        private const string libname = "lzma";
    #endif
    #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
        private const string libname = "liblzma";
    #endif
#endif
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX
        #if (UNITY_STANDALONE_OSX  || UNITY_STANDALONE_LINUX || UNITY_ANDROID || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX)&& !UNITY_EDITOR_WIN
            //set permissions of a file in user, group, other. Each string should contain any or all chars of "rwx".
            //returns 0 on success
            [DllImport(libname, EntryPoint = "lsetPermissions")]
            internal static extern int lsetPermissions(string filePath, string _user, string _group, string _other);
        #endif
        [DllImport(libname, EntryPoint = "decompress7zip")]
        internal static extern int decompress7zip(string filePath, string exctractionPath, bool fullPaths,  string entry, IntPtr progress, IntPtr FileBuffer, int FileBufferLength);
        [DllImport(libname, EntryPoint = "decompress7zip2")]
        internal static extern int decompress7zip2(string filePath, string exctractionPath, bool fullPaths, string entry, IntPtr progress, IntPtr FileBuffer, int FileBufferLength);
        [DllImport(libname, EntryPoint = "_getSize")]
        internal static extern int _getSize(string filePath, string tempPath, IntPtr FileBuffer, int FileBufferLength);
        [DllImport(libname, EntryPoint = "lzmaUtil")]
        internal static extern int lzmaUtil(bool encode, string inPath, string outPath, IntPtr Props);
        [DllImport(libname, EntryPoint = "decode2Buf")]
        internal static extern int decode2Buf(string filePath, string entry,  IntPtr buffer, IntPtr FileBuffer, int FileBufferLength);
        [DllImport(libname, EntryPoint = "_releaseBuffer")]
        internal static extern void _releaseBuffer(IntPtr buffer);
        [DllImport(libname, EntryPoint = "Lzma_Compress")]
        internal static extern IntPtr Lzma_Compress( IntPtr buffer, int bufferLength, bool makeHeader, ref int v, IntPtr Props);
        [DllImport(libname, EntryPoint = "Lzma_Uncompress")]
        internal static extern int Lzma_Uncompress( IntPtr buffer, int bufferLength, int uncompressedSize, IntPtr outbuffer,bool useHeader);
#endif
#if (UNITY_WP_8_1 || UNITY_WSA) && !UNITY_EDITOR
        #if (UNITY_IOS  || UNITY_IPHONE)
            [DllImport("__Internal")]
            internal static extern int lsetPermissions(string filePath, string _user, string _group, string _other);
        #endif
        #if UNITY_WSA_10_0
            [DllImport("liblzma", EntryPoint = "decompress7zip")]
            internal static extern int decompress7zip(string filePath, string exctractionPath, bool fullPaths,  string entry, IntPtr progress, IntPtr FileBuffer, int FileBufferLength);
        #endif
        [DllImport("liblzma", EntryPoint = "decompress7zip2")]
        internal static extern int decompress7zip2(string filePath, string exctractionPath, bool fullPaths, string entry, IntPtr progress, IntPtr FileBuffer, int FileBufferLength);
        [DllImport("liblzma", EntryPoint = "_getSize")]
        internal static extern int _getSize(string filePath, string tempPath, IntPtr FileBuffer, int FileBufferLength);
        [DllImport("liblzma", EntryPoint = "decode2Buf")]
        internal static extern int decode2Buf(string filePath, string entry,  IntPtr buffer, IntPtr FileBuffer, int FileBufferLength);
        [DllImport("liblzma", EntryPoint = "Lzma_Uncompress")]
        internal static extern int Lzma_Uncompress( IntPtr buffer, int bufferLength, int uncompressedSize, IntPtr outbuffer,bool useHeader);
#endif
    // set permissions of a file in user, group, other.
    // Each string should contain any or all chars of "rwx".
    // returns 0 on success
    public static int setFilePermissions(string filePath, string _user, string _group, string _other){
        #if (UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX || UNITY_ANDROID || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_IOS || UNITY_IPHONE) && !UNITY_EDITOR_WIN
            return lsetPermissions(filePath, _user, _group, _other);
        #else
            return -1;
        #endif
    }
    // An integer variable to store the total number of files in a 7z archive, excluding the folders.
    public static int trueTotalFiles = 0;
    //ERROR CODES:
    //  1 : OK
    //    2 : Could not find requested file in archive
    // -1 : Could not open input(7z) file
    // -2 : Decoder doesn't support this archive
    // -3 : Can not allocate memory
    // -4 : CRC error of 7z file
    // -5 : Unknown error
    // -6 : Can not open output file (usually when the path to write to, is invalid)
    // -7 : Can not write output file
    // -8 : Can not close output file
    //The most common use of this library is to download a 7z file in your Application.persistentDataPath directory
    //and decompress it in a folder that you want.
    //int lz=lzma.doDecompress7zip(Application.persistentDataPath+"/myCompresedFile.7z",Application.persistentDataPath+"/myUncompressedFiles/");
    //WSA8.1 does not support large files.
    //filePath            : the full path to the archive, including the archives name. (/myPath/myArchive.7z)
    //exctractionPath    : the path in where you want your files to be extracted
    //progress          : a single item integer array to get the progress of the extracted files (use this function when calling from a separate thread, otherwise call the 2nd implementation)
    //                  : (for ios this integer is not properly updated. So we use the lzma.getProgressCount() function to get the progress. See example.)
    //largeFiles        : set this to true if you are extracting files larger then 30-40 Mb. It is slower though but prevents crashing your app when extracting large files!
    //fullPaths            : set this to true if you want to keep the folder structure of the 7z file.
    //entry                : set the name of a single file file you want to extract from your archive. If the file resides in a folder, the full path should be added.
    //                       (for example  game/meshes/small/table.mesh )
    //FileBuffer        : A buffer that holds a 7zip file. When assigned the function will decompress from this buffer and will ignore the filePath. (Linux, iOS, Android, MacOSX)
    //use this function from a separate thread to get the progress  of the extracted files in the referenced 'progress' integer.
    //
    public static int doDecompress7zip(string filePath, string exctractionPath,  int [] progress, bool largeFiles=false, bool fullPaths=false, string entry=null, byte[] FileBuffer=null){
        int res = 0;
        GCHandle ibuf = GCHandle.Alloc(progress, GCHandleType.Pinned);
        #if (UNITY_IPHONE || UNITY_IOS || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR) && !UNITY_EDITOR_WIN
        if(FileBuffer != null) {
            GCHandle fbuf = GCHandle.Alloc(FileBuffer, GCHandleType.Pinned);
            if (largeFiles){
                res = decompress7zip(null, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject() , fbuf.AddrOfPinnedObject(), FileBuffer.Length);
            }else{
                res =  decompress7zip2(null, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject() , fbuf.AddrOfPinnedObject(), FileBuffer.Length);
            }
                fbuf.Free(); ibuf.Free(); return res;
        } else {
            if (largeFiles){
                res = decompress7zip(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject() , IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }else{
                res = decompress7zip2(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject() , IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }
        }
        #endif
         #if (!UNITY_WSA && !UNITY_WEBGL && !UNITY_EDITOR_OSX && !UNITY_STANDALONE_LINUX && !UNITY_ANDROID && !UNITY_IOS)  || UNITY_EDITOR_WIN || UNITY_WSA_10_0
            if (largeFiles){
                res = decompress7zip(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }else{
                res = decompress7zip2(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }
        #endif
        #if (UNITY_WSA_8_1 ||  UNITY_WP_8_1 || UNITY_WINRT_8_1 || UNITY_WEBGL) && !UNITY_EDITOR
            res = decompress7zip2(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
            ibuf.Free(); return res;
        #endif
    }
    //same as above only the progress integer is a local variable.
    //use this when you don't want to get the progress of the extracted files and when not calling the function from a separate thread.
    public static int doDecompress7zip(string filePath, string exctractionPath,  bool largeFiles = false, bool fullPaths = false, string entry = null, byte[] FileBuffer=null)
    {
        //make a check if the last '/' exists at the end of the exctractionPath and add it if it is missing
        if (@exctractionPath.Substring(@exctractionPath.Length - 1, 1) != "/") { @exctractionPath += "/"; }
        int[] progress = new int[1];
        GCHandle ibuf = GCHandle.Alloc(progress, GCHandleType.Pinned);
        int res = 0;
        #if (UNITY_IPHONE || UNITY_IOS || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR) && !UNITY_EDITOR_WIN
        if(FileBuffer != null) {
            GCHandle fbuf = GCHandle.Alloc(FileBuffer, GCHandleType.Pinned);
            if (largeFiles){
                res = decompress7zip(null, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length);
            }else{
                res = decompress7zip2(null, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length);
            }
                fbuf.Free(); ibuf.Free(); return res;
        } else {
            if (largeFiles){
                res = decompress7zip(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }else{
                res = decompress7zip2(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }
        }
        #endif
        #if (!UNITY_WSA && !UNITY_WEBGL && !UNITY_EDITOR_OSX && !UNITY_STANDALONE_LINUX  && !UNITY_ANDROID && !UNITY_IOS) || UNITY_EDITOR_WIN || UNITY_WSA_10_0
            if (largeFiles){
                res = decompress7zip(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }
            else{
                res = decompress7zip2(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
                ibuf.Free(); return res;
            }
        #endif
        #if (UNITY_WSA_8_1 ||  UNITY_WP_8_1 || UNITY_WINRT_8_1  || UNITY_WEBGL) && !UNITY_EDITOR
            res = decompress7zip2(@filePath, @exctractionPath, fullPaths, entry, ibuf.AddrOfPinnedObject(), IntPtr.Zero, 0);
            ibuf.Free(); return res;
        #endif
    }
#if !(UNITY_WSA || UNITY_WP_8_1) || UNITY_EDITOR
    //ERROR CODES (for both encode/decode LzmaUtil functions):
    //   1 : OK
    // -10 : Can not read input file
    // -11 : Can not write output file
    // -12 : Can not allocate memory
    // -13 : Data error
    //This function encodes a single archive in lzma alone format.
    //inPath    : the file to be encoded. (use full path + file name)
    //outPath    : the .lzma file that will be produced. (use full path + file name)
    //
    //You can set the compression properties by calling the setProps function before.
    //setProps(9) for example will set compression evel to highest level.
    public static int LzmaUtilEncode(string inPath, string outPath){
        if (!defaultsSet) setProps();
        GCHandle prps = GCHandle.Alloc(props, GCHandleType.Pinned);
        int res = lzmaUtil(true, @inPath, @outPath, prps.AddrOfPinnedObject());
        prps.Free();
        return res;
    }
    //This function decodes a single archive in lzma alone format.
    //inPath    : the .lzma file that will be decoded. (use full path + file name)
    //outPath    : the decoded file. (use full path + file name)
    public static int LzmaUtilDecode(string inPath, string outPath){
        return lzmaUtil(false, @inPath, @outPath, IntPtr.Zero);
    }
#endif
    //Lists get filled with filenames (including path if the file is in a folder) and uncompressed file sizes
    public static List <string> ninfo = new List<string>();//filenames
    public static List <long> sinfo = new List<long>();//file sizes
    //this function fills the ArrayLists with the filenames and file sizes that are in the 7zip file
    //returns            : the total size in bytes of the files in the 7z archive
    //
    //filePath            : the full path to the archive, including the archives name. (/myPath/myArchive.7z)
    //tempPath            : (optional) a temp path that will be used to write the files info (otherwise the path of the 7z archive will be used)
    //                    : this is useful when your 7z archive resides in a read only location.
    //                    : the tempPath should be in this form: 'dir/dir/myTempLog' with no slash in the end. The last name will be used as the log's filename.
    //FileBuffer        : A buffer that holds a 7zip file. When assigned the function will read from this buffer and will ignore the filePath. (Linux, iOS, Android, MacOSX)
    //
    //trueTotalFiles is an integer variable to store the total number of files in a 7z archive, excluding the folders.
    public static long get7zInfo(string filePath, string tempPath = null, byte[] FileBuffer = null){
        ninfo.Clear(); sinfo.Clear();
        trueTotalFiles = 0;
        int res = -1;
        string logPath = "";
        #if !NETFX_CORE
            if (@tempPath == null) {
                if(persitentDataPath.Length>0) logPath = @persitentDataPath + "/sevenZip.log"; else  logPath = @Application.persistentDataPath + "/sevenZip.log";
             }else { logPath = @tempPath; }
        #endif
        //for WSA, logPath should always be: Application.persistentDataPath + "/sevenZip.log";
        #if NETFX_CORE
            #if UNITY_WSA_10_0
                if(persitentDataPath.Length>0) logPath = @persitentDataPath + "/sevenZip.log"; else  logPath = @Application.persistentDataPath + "/sevenZip.log";
            #endif
            #if UNITY_WSA_8_1 ||  UNITY_WP_8_1 || UNITY_WINRT_8_1
                if(persitentDataPath.Length>0) logPath = @persitentDataPath + "/sevenZip.log"; else  logPath = @UnityEngine.Windows.Directory.localFolder + "/sevenZip.log";
            #endif
        #endif
        if (File.Exists(logPath + ".txt")) File.Delete(logPath + ".txt");
        #if (UNITY_IPHONE || UNITY_IOS || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR) && !UNITY_EDITOR_WIN
          if(FileBuffer != null) {
                GCHandle fbuf = GCHandle.Alloc(FileBuffer, GCHandleType.Pinned);
                res = _getSize(null, logPath,  fbuf.AddrOfPinnedObject(), FileBuffer.Length);
                fbuf.Free();
            }else {
                res = _getSize(@filePath, logPath,  IntPtr.Zero, 0);
            }
        #else
            res = _getSize(@filePath, logPath,  IntPtr.Zero, 0);
        #endif
        if (res == -1) { /*Debug.Log("Input file not found.");*/ return -1; }
        if (!File.Exists(logPath + ".txt")) {/* Debug.Log("Info file not found.");*/ return -3; }
        #if !NETFX_CORE
            StreamReader r = new StreamReader(logPath + ".txt");
        #endif
        #if NETFX_CORE
            #if UNITY_WSA_10_0
            IsolatedStorageFile ipath = IsolatedStorageFile.GetUserStoreForApplication();
            StreamReader r = new StreamReader(new IsolatedStorageFileStream("sevenZip.log.txt", FileMode.Open, ipath));
            #endif
            #if UNITY_WSA_8_1 ||  UNITY_WP_8_1 || UNITY_WINRT_8_1
            var data = UnityEngine.Windows.File.ReadAllBytes(logPath + ".txt");
            string ss = System.Text.Encoding.UTF8.GetString(data,0,data.Length);
            StringReader r = new StringReader(ss);
            #endif
        #endif
        string line;
        string[] rtt;
        long t = 0, sum = 0;
        while ((line = r.ReadLine()) != null)
        {
            rtt = line.Split('|');
            ninfo.Add(rtt[0]);
            long.TryParse(rtt[1], out t);
            sum += t;
            sinfo.Add(t);
            if (t > 0) trueTotalFiles++;
        }
        #if !NETFX_CORE
            r.Close();
        #endif
        r.Dispose();
        File.Delete(logPath + ".txt");
        return sum;
    }
    //this function returns the uncompressed file size of a given file in the 7z archive if specified,
    //otherwise it will return the total uncompressed size of all the files in the archive.
    //
    //If you don't fill the filePath parameter it will assume that the get7zInfo function has already been called.
    //
    //
    //filePath            : the full path to the archive, including the archives name. (/myPath/myArchive.7z)
    //                     : if you call the function with filePath as null, it will try to find file sizes from the last call.
    //fileName             : the file name we want to get the file size (if it resides in a folder add the folder path also)
    //tempPath            : (optional) a temp path that will be used to write the files info (otherwise the path of the 7z archive will be used)
    //                    : this is useful when your 7z archive resides in a read only location.
    //                    : the tempPath should be in this form: 'dir/dir/myTempLog' with no slash in the end. The last name will be used as the log's filename.
    //FileBuffer        : A buffer that holds a 7zip file. When assigned the function will read from this buffer and will ignore the filePath. (Linux, iOS, Android, MacOSX)
    public static long get7zSize( string filePath=null, string fileName=null, string tempPath=null, byte[] FileBuffer=null){
        if(filePath!=null){
            if(get7zInfo(@filePath, @tempPath, FileBuffer) < 0){ return -1;}
        }
        if(ninfo == null){
            if(ninfo.Count==0) { return -1; }
        }
        long sum=0;
        if(fileName!=null){
            for(int i=0; i<ninfo.Count; i++){
                if(ninfo[i].ToString() == fileName){
                    return (long)sinfo[i];
                }
            }
        }else{
            for(int i=0; i<ninfo.Count; i++){
                sum += (long)sinfo[i];
            }
            return sum;
        }
        return -1;//nothing was found
    }
    //A function to decode a specific archive in a 7z archive to a byte buffer
    //
    //filePath        : the full path to the 7z archive
    //entry            : the file name to decode to a buffer. If the file resides in a folder, the full path should be used.
    //tempPath        : (optional) a temp path that will be used to write the files info (otherwise the path of the 7z archive will be used)
    //                : this is useful when your 7z archive resides in a read only location.
    //                : the tempPath should be in this form: 'dir/dir/myTempLog' with no slash in the end. The last name will be used as the log's filename.
    //FileBuffer    : A buffer that holds a 7zip file. When assigned the function will read from this buffer and will ignore the filePath. (Linux, iOS, Android, MacOSX)
    public static byte[] decode2Buffer(  string filePath, string entry, string tempPath=null, byte[] FileBuffer=null){
        int bufs = (int)get7zSize( @filePath, entry, @tempPath,FileBuffer );
        if (bufs <= 0) return null;//entry error or it does not exist
        byte[] nb = new byte[bufs];
        int res = 0;
        GCHandle dec2buf = GCHandle.Alloc(nb, GCHandleType.Pinned);
        #if (UNITY_IPHONE || UNITY_IOS || UNITY_STANDALONE_OSX || UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR) && !UNITY_EDITOR_WIN
          if(FileBuffer != null) {
                GCHandle fbuf = GCHandle.Alloc(FileBuffer, GCHandleType.Pinned);
                res = decode2Buf(null, entry, dec2buf.AddrOfPinnedObject(), fbuf.AddrOfPinnedObject(), FileBuffer.Length);
                fbuf.Free();
            }else {
                res = decode2Buf(@filePath, entry, dec2buf.AddrOfPinnedObject(), IntPtr.Zero, 0);
            }
        #else
            res = decode2Buf(@filePath, entry, dec2buf.AddrOfPinnedObject(), IntPtr.Zero, 0);
        #endif
        dec2buf.Free();
        if(res==1){ return nb;}
        else {nb=null; return null; }
    }
#if !(UNITY_WSA || UNITY_WP_8_1) || UNITY_EDITOR
    //This function encodes inBuffer to lzma alone format into the outBuffer provided.
    //The buffer can be saved also into a file and can be opened by applications that opens the lzma alone format.
    //This buffer can be uncompressed by the decompressBuffer function.
    //Returns true if success
    //if makeHeader==false then the lzma 13 bytes header will not be added to the buffer.
    //
    //You can set the compression properties by calling the setProps function before.
    //setProps(9) for example will set compression level to the highest level.
    //
    public static  bool compressBuffer(byte[] inBuffer, ref byte[] outBuffer, bool makeHeader=true){
        if (!defaultsSet) setProps();
        GCHandle prps = GCHandle.Alloc(props, GCHandleType.Pinned);
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        IntPtr ptr;
        int res = 0;
        ptr = Lzma_Compress(cbuf.AddrOfPinnedObject(), inBuffer.Length, makeHeader, ref res, prps.AddrOfPinnedObject());
        cbuf.Free(); prps.Free();
        if(res==0 || ptr==IntPtr.Zero){_releaseBuffer(ptr); return false;}
        Array.Resize(ref outBuffer,res);
        Marshal.Copy(ptr, outBuffer, 0, res);
        _releaseBuffer(ptr);
        return true;
    }
    //same as the above function, only it compresses a part of the input buffer.
    //
    //inBufferPartialLength: the size of the input buffer that should be compressed
    //inBufferPartialIndex:  the offset of the input buffer from where the compression will start
    //
    public static bool compressBufferPartial(byte[] inBuffer, int inBufferPartialIndex, int inBufferPartialLength, ref byte[] outBuffer, bool makeHeader = true)
    {
        if(inBufferPartialIndex + inBufferPartialLength > inBuffer.Length) return false;
        if (!defaultsSet) setProps();
        GCHandle prps = GCHandle.Alloc(props, GCHandleType.Pinned);
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        IntPtr ptr;
        IntPtr ptrPartial;
        int res = 0;
        ptrPartial = new IntPtr(cbuf.AddrOfPinnedObject().ToInt64() + inBufferPartialIndex);
        ptr = Lzma_Compress(ptrPartial, inBufferPartialLength, makeHeader, ref res, prps.AddrOfPinnedObject());
        cbuf.Free();
        if (res == 0 || ptr == IntPtr.Zero) { _releaseBuffer(ptr); return false; }
        Array.Resize(ref outBuffer, res);
        Marshal.Copy(ptr, outBuffer, 0, res);
        _releaseBuffer(ptr);
        return true;
    }
    //same as compressBufferPartial, only this function will compress the data into a fixed size buffer
    //the compressed size is returned so you can manipulate it at will.
    public static int compressBufferPartialFixed(byte[] inBuffer, int inBufferPartialIndex, int inBufferPartialLength, ref byte[] outBuffer, bool safe = true,  bool makeHeader = true)
    {
        if(inBufferPartialIndex + inBufferPartialLength > inBuffer.Length) return 0;
        if (!defaultsSet) setProps();
        GCHandle prps = GCHandle.Alloc(props, GCHandleType.Pinned);
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        IntPtr ptr;
        IntPtr ptrPartial;
        int res = 0;
        ptrPartial = new IntPtr(cbuf.AddrOfPinnedObject().ToInt64() + inBufferPartialIndex);
        ptr = Lzma_Compress(ptrPartial, inBufferPartialLength, makeHeader, ref res, prps.AddrOfPinnedObject());
        cbuf.Free();
        if (res == 0 || ptr == IntPtr.Zero) { _releaseBuffer(ptr); return 0; }
        //if the compressed buffer is larger then the fixed size buffer we use:
        //1. then write only the data that fit in it.
        //2. or we return 0.
        //It depends on if we set the safe flag to true or not.
        if(res>outBuffer.Length) {
            if(safe){ _releaseBuffer(ptr); return 0; } else {  res = outBuffer.Length; }
        }
        Marshal.Copy(ptr, outBuffer, 0, res);
        _releaseBuffer(ptr);
        return res;
    }
    //same as the compressBuffer function, only this function will put the result in a fixed size buffer to avoid memory allocations.
    //the compressed size is returned so you can manipulate it at will.
    public static int compressBufferFixed(byte[] inBuffer, ref byte[] outBuffer, bool safe = true, bool makeHeader=true){
        if (!defaultsSet) setProps();
        GCHandle prps = GCHandle.Alloc(props, GCHandleType.Pinned);
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        IntPtr ptr;
        int res = 0;
        ptr = Lzma_Compress(cbuf.AddrOfPinnedObject(), inBuffer.Length, makeHeader, ref res, prps.AddrOfPinnedObject());
        cbuf.Free(); prps.Free();
        if(res==0 || ptr==IntPtr.Zero){_releaseBuffer(ptr); return 0;}
        //if the compressed buffer is larger then the fixed size buffer we use:
        //1. then write only the data that fit in it.
        //2. or we return 0.
        //It depends on if we set the safe flag to true or not.
        if(res>outBuffer.Length) {
            if(safe){ _releaseBuffer(ptr); return 0; } else {  res = outBuffer.Length; }
        }
        Marshal.Copy(ptr, outBuffer, 0, res);
        _releaseBuffer(ptr);
        return res;
    }
#endif
    //This function will decompress a compressed asset bundle.
    //It finds the magic number of the lzma format and extracts from there.
    //
    //inBuffer:        the buffer that stores a compressed asset bundle.
    //outBuffer:    a referenced buffer where the asset bundle will be uncompressed.
    //The error codes
    /*
        OK 0
        ERROR_DATA 1
        ERROR_MEM 2
        ERROR_UNSUPPORTED 4
        ERROR_PARAM 5
        ERROR_INPUT_EOF 6
        ERROR_OUTPUT_EOF 7
        ERROR_FAIL 11
        ERROR_THREAD 12
    */
    public static  int decompressAssetBundle(byte[] inBuffer,  ref byte[] outbuffer){
        int offset = 0;
        for(int i=0; i<inBuffer.Length; i++) {
            if(i>1024) break;
            if(inBuffer[i] == 0x5d) {
                if(inBuffer[i+1] == 0x00) {
                    if(inBuffer[i+2] == 0x00) {
                        if(inBuffer[i+3] == 0x08) {
                            offset = i;  break;
                        }
                    }
                }
            }
        }
        if(offset==0 || offset>1024) return 4;
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        IntPtr ptrBundle = new IntPtr(cbuf.AddrOfPinnedObject().ToInt64() + offset);
        int uncompressedSize = (int)BitConverter.ToUInt64(inBuffer,offset+5);
        if(uncompressedSize<0) { cbuf.Free(); return 4; }
        Array.Resize(ref outbuffer, uncompressedSize);
        GCHandle obuf = GCHandle.Alloc(outbuffer, GCHandleType.Pinned);
        int res = Lzma_Uncompress(ptrBundle, inBuffer.Length-offset, uncompressedSize, obuf.AddrOfPinnedObject(), true);
        cbuf.Free();
        obuf.Free();
        //if(res!=0){/*Debug.Log("ERROR: "+res.ToString());*/ return res; }
        return res;
    }
    /*
    //this will decompress an lzma alone format file.
    public static  int decompressLzmaAlone(string inFile,  string outFile){
        if(File.Exists(inFile)) {
            var inBuffer = File.ReadAllBytes(inFile);
            int offset = 0;
            for(int i=0; i<inBuffer.Length; i++) {
                if(i>16) break;
                if(inBuffer[i] == 0x5d) {
                    if(inBuffer[i+1] == 0x00) {
                        if(inBuffer[i+2] == 0x00) {
                            if(inBuffer[i+3] == 0x00) {
                                offset = i;  break;
                            }
                        }
                    }
                }
            }
            if(offset>16) {  inBuffer=null; return 4; }
            GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
            IntPtr ptrBundle = new IntPtr(cbuf.AddrOfPinnedObject().ToInt64() + offset);
            int uncompressedSize = (int)BitConverter.ToUInt64(inBuffer,offset+5);
            if(uncompressedSize<0) { cbuf.Free(); return 4; }
            byte[] outBuffer = new byte[uncompressedSize];
            GCHandle obuf = GCHandle.Alloc(outBuffer, GCHandleType.Pinned);
            int res = Lzma_Uncompress(ptrBundle, inBuffer.Length-offset, uncompressedSize, obuf.AddrOfPinnedObject(), true);
            cbuf.Free();
            obuf.Free();
            File.WriteAllBytes(outFile, outBuffer);
            Array.Resize(ref outBuffer, 0);
            Array.Resize(ref inBuffer, 0);
            outBuffer = null;
            inBuffer = null;
            GC.Collect();
            return res;
        } else {
            return -1;
        }
    }
    */
    //This function decompresses an lzma compressed byte buffer.
    //If the useHeader flag is false you have to provide the uncompressed size of the buffer via the customLength integer.
    //if res==0 operation was successful
    //The error codes
    /*
        OK 0
        ERROR_DATA 1
        ERROR_MEM 2
        ERROR_UNSUPPORTED 4
        ERROR_PARAM 5
        ERROR_INPUT_EOF 6
        ERROR_OUTPUT_EOF 7
        ERROR_FAIL 11
        ERROR_THREAD 12
        */
    public static  int decompressBuffer(byte[] inBuffer,  ref byte[] outbuffer, bool useHeader=true, int customLength=0){
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        int uncompressedSize = 0;
        //if the lzma header will be used to extract the uncompressed size of the buffer. If the buffer does not have a header
        //provide the known uncompressed size through the customLength integer.
        if(useHeader) uncompressedSize = (int)BitConverter.ToUInt64(inBuffer,5); else uncompressedSize = customLength;
        Array.Resize(ref outbuffer, uncompressedSize);
        GCHandle obuf = GCHandle.Alloc(outbuffer, GCHandleType.Pinned);
        int res = Lzma_Uncompress(cbuf.AddrOfPinnedObject(), inBuffer.Length, uncompressedSize, obuf.AddrOfPinnedObject(), useHeader);
        cbuf.Free();
        obuf.Free();
        //if(res!=0){/*Debug.Log("ERROR: "+res.ToString());*/ return res; }
        return res;
    }
    public static  byte[] decompressBuffer(byte[] inBuffer, bool useHeader=true, int customLength=0){
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        int uncompressedSize = 0;
        //if the lzma header will be used to extract the uncompressed size of the buffer. If the buffer does not have a header
        //provide the known uncompressed size through the customLength integer.
        if(useHeader) uncompressedSize = (int)BitConverter.ToUInt64(inBuffer,5); else uncompressedSize = customLength;
        byte[] outbuffer = new byte[uncompressedSize];
        GCHandle obuf = GCHandle.Alloc(outbuffer, GCHandleType.Pinned);
        int res = Lzma_Uncompress(cbuf.AddrOfPinnedObject(), inBuffer.Length, uncompressedSize, obuf.AddrOfPinnedObject(), useHeader);
        cbuf.Free();
        obuf.Free();
        if(res!=0){/*Debug.Log("ERROR: "+res.ToString());*/ return null; }
        return outbuffer;
    }
    //same as above function. Only this one outputs to a buffer of fixed which size isn't resized to avoid memory allocations.
    //The fixed buffer should have a size that will be able to hold the incoming decompressed data.
    //returns the uncompressed size.
    public static  int decompressBufferFixed(byte[] inBuffer,  ref byte[] outbuffer, bool safe = true, bool useHeader=true, int customLength=0){
        int uncompressedSize = 0;
        //if the lzma header will be used to extract the uncompressed size of the buffer. If the buffer does not have a header
        //provide the known uncompressed size through the customLength integer.
        if(useHeader) uncompressedSize = (int)BitConverter.ToUInt64(inBuffer,5); else uncompressedSize = customLength;
        //Check if the uncompressed size is bigger then the size of the fixed buffer. Then:
        //1. write only the data that fit in it.
        //2. or return a negative number.
        //It depends on if we set the safe flag to true or not.
        if(uncompressedSize > outbuffer.Length) {
            if(safe) return -101;  else  uncompressedSize = outbuffer.Length;
         }
        GCHandle cbuf = GCHandle.Alloc(inBuffer, GCHandleType.Pinned);
        GCHandle obuf = GCHandle.Alloc(outbuffer, GCHandleType.Pinned);
        int res = Lzma_Uncompress(cbuf.AddrOfPinnedObject(), inBuffer.Length, uncompressedSize, obuf.AddrOfPinnedObject(), useHeader);
        cbuf.Free();
        obuf.Free();
        if(res!=0){/*Debug.Log("ERROR: "+res.ToString());*/ return -res; }
        return uncompressedSize;
    }
}
Assets/Plugins/SevenZip/lzma.cs.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 13c1c59b80961f74e9c2c894f0961517
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
Assets/Plugins/iOS/bitcode.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: aea70e06332fd3e4cb4798606c87a13e
folderAsset: yes
timeCreated: 1452862552
licenseType: Store
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/libbrotli.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d5a3daf797c64c94c81b903bc20465b7
folderAsset: yes
timeCreated: 1455164213
licenseType: Store
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/libfastlz.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 168c23f7b2a985844bb1d75f8f6def1c
folderAsset: yes
timeCreated: 1452858581
licenseType: Store
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/liblz4.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f08f107c1bc95c44e88b396f562d726e
folderAsset: yes
timeCreated: 1452858581
licenseType: Store
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/liblzma.a-aggressive-bitcode.zip
Binary files differ
Assets/Plugins/iOS/bitcode/liblzma.a-aggressive-bitcode.zip.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b2699330b724ffc4d92e81ab4554b568
timeCreated: 1452855403
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/liblzma.a-fastest-smallest-bitcode.zip
Binary files differ
Assets/Plugins/iOS/bitcode/liblzma.a-fastest-smallest-bitcode.zip.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3e3113bc8d3c63344a4276ea5cacdbcc
timeCreated: 1452855403
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/liblzma.a-tvOS-bitcode.zip
Binary files differ
Assets/Plugins/iOS/bitcode/liblzma.a-tvOS-bitcode.zip.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 527d7a6912edd7f4998b09a787646512
timeCreated: 1452855403
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/liblzma.a-watchOS-bitcode.zip
Binary files differ
Assets/Plugins/iOS/bitcode/liblzma.a-watchOS-bitcode.zip.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: afeda9bca77bb774f812793c304fc961
timeCreated: 1452855403
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/liblzma.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 95f44f25645ad824490021beb8785cc2
folderAsset: yes
timeCreated: 1452858581
licenseType: Store
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/bitcode/libzipw.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f03c7c5e39169574593b46ac54fd5531
folderAsset: yes
timeCreated: 1452858581
licenseType: Store
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/liblzma.a
Binary files differ
Assets/Plugins/iOS/liblzma.a-simulator.zip
Binary files differ
Assets/Plugins/iOS/liblzma.a-simulator.zip.meta
New file
@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 8df3da085354f294c9f9e57a31ba34cf
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/liblzma.a.aggresive.zip
Binary files differ
Assets/Plugins/iOS/liblzma.a.aggresive.zip.meta
New file
@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 105d619dcc562f943acdd38091063327
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/liblzma.a.fastest-smallest.zip
Binary files differ
Assets/Plugins/iOS/liblzma.a.fastest-smallest.zip.meta
New file
@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: a09a492a241113640a4f6d92fcbf3b06
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/liblzma.a.fastest.zip
Binary files differ
Assets/Plugins/iOS/liblzma.a.fastest.zip.meta
New file
@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 01faae07d6f95d542b54575ee72e8251
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/liblzma.a.meta
New file
@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 105d4f0d61dadd545bcaa1893acff966
PluginImporter:
  serializedVersion: 1
  iconMap: {}
  executionOrder: {}
  isPreloaded: 0
  platformData:
    Any:
      enabled: 0
      settings: {}
    Editor:
      enabled: 0
      settings:
        DefaultValueInitialized: true
    iOS:
      enabled: 1
      settings: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/iOS/liblzma.smallest.zip
Binary files differ
Assets/Plugins/iOS/liblzma.smallest.zip.meta
New file
@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: c4bfcb521dd223a4f9f982364b11aa9a
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/liblzma.bundle.meta
New file
@@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 63d5675a14cb23e49912d4f187b616e8
folderAsset: yes
PluginImporter:
  serializedVersion: 2
  iconMap: {}
  executionOrder: {}
  isPreloaded: 0
  isOverridable: 0
  platformData:
    data:
      first:
        Android: Android
      second:
        enabled: 0
        settings:
          CPU: AnyCPU
    data:
      first:
        Any:
      second:
        enabled: 0
        settings: {}
    data:
      first:
        Editor: Editor
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
          DefaultValueInitialized: true
          OS: OSX
    data:
      first:
        Facebook: Win
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Facebook: Win64
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Standalone: Linux
      second:
        enabled: 1
        settings:
          CPU: x86
    data:
      first:
        Standalone: Linux64
      second:
        enabled: 1
        settings:
          CPU: x86_64
    data:
      first:
        Standalone: LinuxUniversal
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Standalone: OSXIntel
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Standalone: OSXIntel64
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Standalone: OSXUniversal
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Standalone: Win
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
    data:
      first:
        Standalone: Win64
      second:
        enabled: 1
        settings:
          CPU: AnyCPU
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/liblzma.bundle/Contents.meta
New file
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dc97a21f359ee4227b7f5c87717fb807
folderAsset: yes
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/liblzma.bundle/Contents/Info.plist
New file
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>BuildMachineOSBuild</key>
    <string>15E65</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleExecutable</key>
    <string>liblzma</string>
    <key>CFBundleIdentifier</key>
    <string>com.lzma.liblzma</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>liblzma</string>
    <key>CFBundlePackageType</key>
    <string>BNDL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleSupportedPlatforms</key>
    <array>
        <string>MacOSX</string>
    </array>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>DTCompiler</key>
    <string>com.apple.compilers.llvm.clang.1_0</string>
    <key>DTPlatformBuild</key>
    <string>7D175</string>
    <key>DTPlatformVersion</key>
    <string>GM</string>
    <key>DTSDKBuild</key>
    <string>15E60</string>
    <key>DTSDKName</key>
    <string>macosx10.11</string>
    <key>DTXcode</key>
    <string>0730</string>
    <key>DTXcodeBuild</key>
    <string>7D175</string>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © 2015 liblzma. All rights reserved.</string>
</dict>
</plist>
Assets/Plugins/liblzma.bundle/Contents/Info.plist.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8dfb9d1243974425dbfb586b931e8fcf
timeCreated: 1461938405
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/liblzma.bundle/Contents/MacOS.meta
New file
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fcdc6e0bbfd78425f96d7e8a1196b892
folderAsset: yes
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/liblzma.bundle/Contents/MacOS/liblzma
Binary files differ
Assets/Plugins/liblzma.bundle/Contents/MacOS/liblzma.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ce457a7d0ad044b069c5f1e12c271693
timeCreated: 1461938405
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/x86.meta
New file
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4d91deb074c81564388a0deffdb37efe
folderAsset: yes
timeCreated: 1541063936
licenseType: Pro
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/x86/liblzma.dll
Binary files differ
Assets/Plugins/x86/liblzma.dll.meta
New file
@@ -0,0 +1,78 @@
fileFormatVersion: 2
guid: d994befc74ab2d14eaac2bb81af65a34
PluginImporter:
  serializedVersion: 1
  iconMap: {}
  executionOrder: {}
  isPreloaded: 0
  platformData:
    Android:
      enabled: 0
      settings:
        CPU: AnyCPU
    Any:
      enabled: 0
      settings: {}
    Editor:
      enabled: 1
      settings:
        CPU: x86
        DefaultValueInitialized: true
        OS: AnyOS
    Linux:
      enabled: 1
      settings:
        CPU: x86
    Linux64:
      enabled: 1
      settings:
        CPU: None
    LinuxUniversal:
      enabled: 1
      settings:
        CPU: AnyCPU
    OSXIntel:
      enabled: 1
      settings:
        CPU: AnyCPU
    OSXIntel64:
      enabled: 1
      settings:
        CPU: None
    OSXUniversal:
      enabled: 1
      settings:
        CPU: AnyCPU
    SamsungTV:
      enabled: 0
      settings:
        STV_MODEL: STANDARD_13
    WP8:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
    Win:
      enabled: 1
      settings:
        CPU: AnyCPU
    Win64:
      enabled: 0
      settings:
        CPU: None
    WindowsStoreApps:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
        SDK: AnySDK
    iOS:
      enabled: 0
      settings:
        CompileFlags:
        FrameworkDependencies:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/x86/liblzma.so
Binary files differ
Assets/Plugins/x86/liblzma.so.meta
New file
@@ -0,0 +1,78 @@
fileFormatVersion: 2
guid: ff306ab5a1e61dd43949f88c2ed78bf1
PluginImporter:
  serializedVersion: 1
  iconMap: {}
  executionOrder: {}
  isPreloaded: 0
  platformData:
    Android:
      enabled: 0
      settings:
        CPU: AnyCPU
    Any:
      enabled: 0
      settings: {}
    Editor:
      enabled: 1
      settings:
        CPU: x86
        DefaultValueInitialized: true
        OS: AnyOS
    Linux:
      enabled: 1
      settings:
        CPU: x86
    Linux64:
      enabled: 0
      settings:
        CPU: None
    LinuxUniversal:
      enabled: 1
      settings:
        CPU: x86
    OSXIntel:
      enabled: 0
      settings:
        CPU: None
    OSXIntel64:
      enabled: 0
      settings:
        CPU: None
    OSXUniversal:
      enabled: 0
      settings:
        CPU: None
    SamsungTV:
      enabled: 0
      settings:
        STV_MODEL: STANDARD_13
    WP8:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
    Win:
      enabled: 1
      settings:
        CPU: AnyCPU
    Win64:
      enabled: 1
      settings:
        CPU: None
    WindowsStoreApps:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
        SDK: AnySDK
    iOS:
      enabled: 0
      settings:
        CompileFlags:
        FrameworkDependencies:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/x86_64.meta
New file
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: af7a02cd8159b3f43a03b1eb98f5e4f7
folderAsset: yes
DefaultImporter:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/x86_64/liblzma.dll
Binary files differ
Assets/Plugins/x86_64/liblzma.dll.meta
New file
@@ -0,0 +1,78 @@
fileFormatVersion: 2
guid: f2d2b6279f15d5742abe1a18469e956e
PluginImporter:
  serializedVersion: 1
  iconMap: {}
  executionOrder: {}
  isPreloaded: 0
  platformData:
    Android:
      enabled: 0
      settings:
        CPU: AnyCPU
    Any:
      enabled: 0
      settings: {}
    Editor:
      enabled: 1
      settings:
        CPU: x86_64
        DefaultValueInitialized: true
        OS: AnyOS
    Linux:
      enabled: 1
      settings:
        CPU: None
    Linux64:
      enabled: 1
      settings:
        CPU: x86_64
    LinuxUniversal:
      enabled: 1
      settings:
        CPU: AnyCPU
    OSXIntel:
      enabled: 1
      settings:
        CPU: None
    OSXIntel64:
      enabled: 1
      settings:
        CPU: AnyCPU
    OSXUniversal:
      enabled: 1
      settings:
        CPU: AnyCPU
    SamsungTV:
      enabled: 0
      settings:
        STV_MODEL: STANDARD_13
    WP8:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
    Win:
      enabled: 0
      settings:
        CPU: None
    Win64:
      enabled: 1
      settings:
        CPU: AnyCPU
    WindowsStoreApps:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
        SDK: AnySDK
    iOS:
      enabled: 0
      settings:
        CompileFlags:
        FrameworkDependencies:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Plugins/x86_64/liblzma.so
Binary files differ
Assets/Plugins/x86_64/liblzma.so.meta
New file
@@ -0,0 +1,78 @@
fileFormatVersion: 2
guid: 7778049c517fa6a42a4c1c97c462fb57
PluginImporter:
  serializedVersion: 1
  iconMap: {}
  executionOrder: {}
  isPreloaded: 0
  platformData:
    Android:
      enabled: 0
      settings:
        CPU: AnyCPU
    Any:
      enabled: 0
      settings: {}
    Editor:
      enabled: 1
      settings:
        CPU: x86_64
        DefaultValueInitialized: true
        OS: AnyOS
    Linux:
      enabled: 0
      settings:
        CPU: None
    Linux64:
      enabled: 1
      settings:
        CPU: x86_64
    LinuxUniversal:
      enabled: 1
      settings:
        CPU: x86_64
    OSXIntel:
      enabled: 0
      settings:
        CPU: None
    OSXIntel64:
      enabled: 0
      settings:
        CPU: None
    OSXUniversal:
      enabled: 0
      settings:
        CPU: None
    SamsungTV:
      enabled: 0
      settings:
        STV_MODEL: STANDARD_13
    WP8:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
    Win:
      enabled: 1
      settings:
        CPU: None
    Win64:
      enabled: 1
      settings:
        CPU: AnyCPU
    WindowsStoreApps:
      enabled: 0
      settings:
        CPU: AnyCPU
        DontProcess: False
        PlaceholderPath:
        SDK: AnySDK
    iOS:
      enabled: 0
      settings:
        CompileFlags:
        FrameworkDependencies:
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Config/PriorBundle.txt
@@ -1,127 +1,107 @@
int    string    int
id    AssetABName    AssetType
唯一标识    资源ab包名    资源类型1.场景;2.npc资源;3.音效.4特效
1    createrole_001    1
2    level_login    1
3    map000_xsdt    1
4    map001_sjz    1
5    map002_yg    1
6    Map003_Yjsz    1
7    Map125_Shfb    1
8    map111_lqrz    1
9    Map113_Fyt    1
10    map128_fmt    1
11    Map119_Qlzf    1
12    createrole    2
13    prefab_race_a_fs    2
14    prefab_race_a_zs    2
15    prefab_race_P001    2
16    prefab_race_n001    2
17    prefab_race_M152    2
18    prefab_race_L001    2
19    prefab_race_L002    2
20    prefab_race_L003    2
21    prefab_race_N017    2
22    prefab_race_N017a    2
23    prefab_race_N999    2
24    prefab_race_N002    2
25    prefab_race_M003    2
26    prefab_race_M001    2
27    prefab_race_M709    2
28    prefab_race_M004    2
29    prefab_race_M005    2
30    prefab_race_M006    2
31    prefab_race_M007    2
32    prefab_race_N034    2
33    prefab_race_N012    2
34    prefab_race_N003    2
35    prefab_race_M131    2
36    prefab_race_N010    2
37    prefab_race_M128    2
38    prefab_race_N013    2
39    prefab_race_M126    2
40    prefab_race_N015    2
41    prefab_race_M008    2
42    prefab_race_M704    2
43    prefab_race_M703    2
44    prefab_race_M012    2
45    prefab_race_M011    2
46    prefab_race_M013    2
47    prefab_race_M014    2
48    prefab_race_M135    2
49    prefab_race_N011    2
50    prefab_race_M129    2
51    prefab_race_M132    2
52    prefab_race_M015    2
53    prefab_race_M017    2
54    prefab_race_M018    2
55    prefab_race_M016    2
56    prefab_race_M700    2
57    prefab_race_M701    2
58    prefab_race_M021    2
59    prefab_race_M063    2
60    prefab_race_M064    2
61    prefab_race_M065    2
62    prefab_race_M097    2
63    prefab_race_L004    2
64    prefab_race_M104    2
65    prefab_race_Sh01    2
66    prefab_race_Sh02    2
67    prefab_race_N031    2
68    prefab_race_N032    2
69    prefab_race_A_Zs00    2
70    prefab_race_A_Fs00    2
71    prefab_race_A_Zs00_Wq    2
72    prefab_race_A_Fs00_Wq    2
73    prefab_race_A_Zs00_fwq    2
74    prefab_race_A_Fs00_fwq    2
75    prefab_race_A_Zs01    2
76    prefab_race_A_Fs01    2
77    prefab_race_A_Zs01_Wq    2
78    prefab_race_A_Fs01_Wq    2
79    prefab_race_A_Zs01_fwq    2
80    prefab_race_A_Fs01_fwq    2
81    prefab_race_A_Zs02    2
82    prefab_race_A_Fs02    2
83    prefab_race_A_Zs02_Wq    2
84    prefab_race_A_Fs02_Wq    2
85    prefab_race_A_Zs02_fwq    2
86    prefab_race_A_Fs02_fwq    2
87    prefab_race_Zq04    2
88    Prefab_Race_B_Cw06    2
89    prefab_race_A_Zs99_Wq    2
90    prefab_race_A_Fs99_Wq    2
91    Prefab_Race_B_Cw09    2
92    prefab_race_Zq05    2
93    prefab_race_A_Zs_Cb01    2
94    prefab_race_A_Fs_Cb01    2
95    prefab_race_B_Cw02    2
96    prefab_race_Zq01    2
97    prefab_race_Zq00    2
98    prefab_race_B_Cw16    2
99    prefab_race_ranshaoquan    2
100    prefab_race_a_zs00_sb    2
101    prefab_race_a_zs01_sb    2
102    prefab_race_a_zs02_sb    2
103    prefab_race_a_zs03_sb    2
104    prefab_race_a_zs04_sb    2
105    prefab_race_a_zs05_sb    2
106    prefab_race_a_zs06_sb    2
107    prefab_race_a_zs07_sb    2
108    prefab_race_a_zs08_sb    2
109    prefab_race_a_zs09_sb    2
110    prefab_race_a_zs10_sb    2
111    prefab_race_a_zs99_sb    2
112    boss1    3
113    music1    3
114    role1    3
115    show1    3
116    speak1    3
117    ui1    3
118    bossskill1    4
119    cj    4
120    common1    4
121    debuff1    4
122    dsskill1    4
123    skill1    4
124    ui1    4
int    string    int    int
id    AssetABName    AssetType    Prior
唯一标识    资源ab包名    资源类型1.场景;2.npc资源;3.音效.4特效    优先级(优先级为1的随包;优先级不为1的进入后开始下载,下载优先级按照填写的数字由小到大)
1    createrole_001    1    1
2    level_login    1    1
3    map001_sjz    1    1
4    map002_yg    1    2
5    Map003_Yjsz    1    3
6    Map125_Shfb    1    3
7    map111_lqrz    1    1
8    Map113_Fyt    1    2
9    map128_fmt    1    2
10    Map119_Qlzf    1    3
11    createrole    2    1
12    prefab_race_a_fs    2    1
13    prefab_race_a_zs    2    1
14    prefab_race_P001    2    1
15    prefab_race_n001    2    1
16    prefab_race_M003    2    1
17    prefab_race_M001    2    1
18    prefab_race_M709    2    1
19    prefab_race_M004    2    1
20    prefab_race_M005    2    1
21    prefab_race_M006    2    1
22    prefab_race_M007    2    1
23    prefab_race_N034    2    1
24    prefab_race_N012    2    1
25    prefab_race_N003    2    1
26    prefab_race_M131    2    1
27    prefab_race_N010    2    1
28    prefab_race_M128    2    2
29    prefab_race_N013    2    2
30    prefab_race_M126    2    2
31    prefab_race_N015    2    2
32    prefab_race_M008    2    2
33    prefab_race_M704    2    2
34    prefab_race_M703    2    2
35    prefab_race_M012    2    2
36    prefab_race_M011    2    2
37    prefab_race_M013    2    2
38    prefab_race_M014    2    2
39    prefab_race_M135    2    2
40    prefab_race_N011    2    2
41    prefab_race_N017    2    2
42    prefab_race_M129    2    3
43    prefab_race_M132    2    3
44    prefab_race_M015    2    3
45    prefab_race_M017    2    3
46    prefab_race_M018    2    3
47    prefab_race_M016    2    3
48    prefab_race_M700    2    3
49    prefab_race_M701    2    3
50    prefab_race_M021    2    3
51    prefab_race_M063    2    3
52    prefab_race_M064    2    3
53    prefab_race_M065    2    3
54    prefab_race_M097    2    3
55    prefab_race_L004    2    3
56    prefab_race_M104    2    3
57    prefab_race_Sh01    2    1
58    prefab_race_Sh02    2    1
59    prefab_race_N031    2    2
60    prefab_race_N032    2    2
61    prefab_race_A_Zs00    2    1
62    prefab_race_A_Fs00    2    1
63    prefab_race_A_Zs00_Wq    2    1
64    prefab_race_A_Fs00_Wq    2    1
65    prefab_race_A_Zs00_fwq    2    1
66    prefab_race_A_Fs00_fwq    2    1
67    prefab_race_A_Zs01    2    1
68    prefab_race_A_Fs01    2    1
69    prefab_race_A_Zs01_Wq    2    1
70    prefab_race_A_Fs01_Wq    2    1
71    prefab_race_A_Zs01_fwq    2    1
72    prefab_race_A_Fs01_fwq    2    1
73    prefab_race_A_Zs02    2    2
74    prefab_race_A_Fs02    2    2
75    prefab_race_A_Zs02_Wq    2    2
76    prefab_race_A_Fs02_Wq    2    2
77    prefab_race_A_Zs02_fwq    2    2
78    prefab_race_A_Fs02_fwq    2    2
79    prefab_race_Zq04    2    1
80    Prefab_Race_B_Cw06    2    1
81    prefab_race_A_Zs99_Wq    2    2
82    prefab_race_A_Fs99_Wq    2    2
83    Prefab_Race_B_Cw09    2    2
84    prefab_race_Zq05    2    2
85    prefab_race_A_Zs_Cb01    2    1
86    prefab_race_A_Fs_Cb01    2    1
87    prefab_race_B_Cw02    2    2
88    prefab_race_Zq01    2    2
89    prefab_race_B_Cw16    2    2
90    prefab_race_ranshaoquan    2    2
91    prefab_race_Zq00    2    2
92    boss1    3    1
93    music1    3    1
94    role1    3    1
95    show1    3    1
96    speak1    3    1
97    ui1    3    1
98    bossskill1    4    1
99    cj    4    1
100    common1    4    1
101    debuff1    4    1
102    dsskill1    4    1
103    skill1    4    1
104    ui1    4    1
Assets/test7zip.cs
New file
@@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
public class test7zip : MonoBehaviour
{
    // Use this for initialization
    void Start()
    {
    }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.F))
        {
            var files = new List<FileInfo>();
            FileExtersion.GetAllDirectoryFileInfos(Application.streamingAssetsPath, files);
            foreach (var item in files)
            {
                var fullName = item.FullName;
                if (fullName.EndsWith(".7z"))
                {
                    SevenZipUtility.DeCompress(fullName, Path.GetDirectoryName(fullName));
                    File.Delete(fullName);
                }
            }
        }
    }
}
Assets/test7zip.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7a1b12e7a570a4345879992fcd78e239
timeCreated: 1541066123
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant: