/// <summary>
        /// Zip压缩至byte[]
        /// </summary>
        /// <param name="srcFolder"></param>
        /// <param name="最顶层是否是文件夹(如果不是,则是文件夹下的一个个文件)"></param>
        /// <returns></returns>
        public static byte[] CompressFromFolder(string srcFolder, bool topFolder)
        {
            AbstractFile memoryFile = new MemoryFile();
            //AbstractFile memoryFile = new DiskFile(System.IO.Path.GetTempFileName());

            ZipArchive archive = CreateZipArchive(memoryFile);

            if (topFolder)
            {
                AbstractFolder source = new DiskFolder(srcFolder);
                source.CopyTo(archive, true);
            }
            else
            {
                foreach (var i in archive.GetItems(false))
                {
                    i.CopyTo(archive, true);
                }
            }

            byte[] buffer;
            using (Stream destStream = memoryFile.OpenRead(FileShare.Read))
            {
                buffer = new byte[destStream.Length];
                destStream.Read(buffer, 0, buffer.Length);
                destStream.Close();
            }

            memoryFile.Delete();
            return(buffer);
        }
        /// <summary>
        /// Zip解压缩byte[]至文件夹
        /// </summary>
        /// <param name="srcByte"></param>
        /// <param name="destFolder"></param>
        public static void DecompressToFolder(byte[] srcByte, string destFolder)
        {
            AbstractFile memoryFile = new MemoryFile();

            //AbstractFile memoryFile = new DiskFile(System.IO.Path.GetTempPath() + "memoryFile.zip");
            memoryFile.Create();

            using (Stream stream = memoryFile.OpenWrite(true, FileShare.Write))
            {
                stream.Write(srcByte, 0, srcByte.Length);
                stream.Close();
            }

            // 必须先写MemoryFile再创建ZipArchive
            ZipArchive archive = CreateZipArchive(memoryFile);

            AbstractFolder dest = new DiskFolder(destFolder);

            archive.CopyFilesTo(dest, true, true, null);

            memoryFile.Delete();
        }
        /// <summary>
        /// Zip压缩至byte[]
        /// </summary>
        /// <param name="srcFolder"></param>
        /// <param name="最顶层是否是文件夹(如果不是,则是文件夹下的一个个文件)"></param>
        /// <returns></returns>
        public static byte[] CompressFromFolder(string srcFolder, bool topFolder)
        {
            AbstractFile memoryFile = new MemoryFile();
            //AbstractFile memoryFile = new DiskFile(System.IO.Path.GetTempFileName());

            ZipArchive archive = CreateZipArchive(memoryFile);

            if (topFolder)
            {
                AbstractFolder source = new DiskFolder(srcFolder);
                source.CopyTo(archive, true);
            }
            else
            {
                foreach (var i in archive.GetItems(false))
                {
                    i.CopyTo(archive, true);
                }
            }

            byte[] buffer;
            using (Stream destStream = memoryFile.OpenRead(FileShare.Read))
            {
                buffer = new byte[destStream.Length];
                destStream.Read(buffer, 0, buffer.Length);
                destStream.Close();
            }

            memoryFile.Delete();
            return buffer;
        }
        /// <summary>
        /// Zip解压缩byte[]至文件夹
        /// </summary>
        /// <param name="srcByte"></param>
        /// <param name="destFolder"></param>
        public static void DecompressToFolder(byte[] srcByte, string destFolder)
        {
            AbstractFile memoryFile = new MemoryFile();
            //AbstractFile memoryFile = new DiskFile(System.IO.Path.GetTempPath() + "memoryFile.zip");
            memoryFile.Create();

            using (Stream stream = memoryFile.OpenWrite(true, FileShare.Write))
            {
                stream.Write(srcByte, 0, srcByte.Length);
                stream.Close();
            }

            // 必须先写MemoryFile再创建ZipArchive
            ZipArchive archive = CreateZipArchive(memoryFile);

            AbstractFolder dest = new DiskFolder(destFolder);
            archive.CopyFilesTo(dest, true, true, null);

            memoryFile.Delete();
        }