Skip to content

Instantly share code, notes, and snippets.

@SnowyYANG
Last active March 12, 2024 08:57
Show Gist options
  • Save SnowyYANG/56131efe6d4033d186bbd49491709adb to your computer and use it in GitHub Desktop.
Save SnowyYANG/56131efe6d4033d186bbd49491709adb to your computer and use it in GitHub Desktop.
阴桃花dlc捕风日记 将xaml伪加密打包
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