Beispiel #1
0
        public void readArchiveFile2Bytes(FileStream fileHandle, ref byte[] bytes)
        {
            fileHandle.Seek(m_fileOffset, SeekOrigin.Begin);                    // 移动到文件开始位置

            uint readlength = (uint)fileHandle.Read(bytes, 0, (int)m_fileSize);

            if (readlength == m_fileSize)
            {
                if (!UtilPak.checkFlags(FileHeaderFlag.eFHF_CPS, ref m_flags))
                {
                }
                else                    // 需要解压
                {
                    byte[] retChar = null;
                    MLzma.DecompressStrLZMA(bytes, m_fileSize, ref retChar, ref m_fileSize);
                    bytes = retChar;
                }
            }
        }
Beispiel #2
0
 // 当前文件是否被压缩
 public bool bCompress()
 {
     return(UtilPak.checkFlags(FileHeaderFlag.eFHF_CPS, ref m_flags));
 }