Пример #1
0
        /// <summary>
        /// 解压缩内部实现
        /// </summary>
        /// <param name="obj"></param>
        private static void DecompressByteInternal(object obj)
        {
            FileByteChangeInfo info         = (FileByteChangeInfo)obj;
            CodeProgress       codeProgress = null;

            if (info.progress != null)
            {
                codeProgress = new CodeProgress(info.progress);
            }
            Decompress(info.inPathByteArray, info.outPath, codeProgress, info.codeComplete);
        }
Пример #2
0
        public static void DecompressAsync(byte[] inFileByteArray, string outFile, ProgressDelegate progress = null, System.Action codeCompeleteFunc = null)
        {
            Thread             thread = new Thread(new ParameterizedThreadStart(DecompressByteInternal));
            FileByteChangeInfo info   = new FileByteChangeInfo()
            {
                inPathByteArray = inFileByteArray,
                outPath         = outFile,
                progress        = progress,
                codeComplete    = codeCompeleteFunc
            };

            thread.Start(info);
        }