浩辰PC3文件反编译,读取文件报错。请问怎么读取?
本帖最后由 qwuiop789 于 2022-6-10 17:37 编辑FileStream stream = new FileStream(@"C:\Users\MFGYF-LiPan\Desktop\pc333\浩辰.pc3", FileMode.Open, FileAccess.Read);
var headerBytes = new byte;
// Ignore 12 byte checksum 有12个是校验信息,所以不解压
stream.Read(headerBytes, 0, headerBytes.Length);//二进制读取这些信息
var headerString = Encoding.Default.GetString(headerBytes);
stream.Seek(70, SeekOrigin.Begin);//从60字节位置开始解压
string inflatedString;
using (var zStream = new InflaterInputStream(stream))//压缩流
{
var sr = new StreamReader(zStream);//自动编码读取压缩流
inflatedString = sr.ReadToEnd(); //读到最后
}
Console.ReadKey();
stream.Seek(60, SeekOrigin.Begin);//从60字节位置开始解压 问题解决没
页:
[1]