Last active
March 12, 2024 08:57
-
-
Save SnowyYANG/56131efe6d4033d186bbd49491709adb to your computer and use it in GitHub Desktop.
阴桃花dlc捕风日记 将xaml伪加密打包
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace CompressDlc | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
FileInfo fileToBeDeflateZipped = new FileInfo(@"dlc.xaml"); | |
FileInfo deflateZipFileName = new FileInfo(@"dlc.raw"); | |
using (FileStream fileToBeZippedAsStream = fileToBeDeflateZipped.OpenRead()) | |
{ | |
using (FileStream deflateZipTargetAsStream = deflateZipFileName.Create()) | |
{ | |
using (DeflateStream deflateZipStream = new DeflateStream(deflateZipTargetAsStream, CompressionMode.Compress)) | |
{ | |
try | |
{ | |
fileToBeZippedAsStream.CopyTo(deflateZipStream); | |
} | |
catch (Exception ex) | |
{ | |
Console.WriteLine(ex.Message); | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment