示例#1
0
 //
 //	copied the source file by https://github.com/stackprobe/Factory/blob/master/SubTools/CopyLib.c
 //
 public static byte[] Decode(byte[] data)
 {
     MaskGZData(data);
     byte[] ret = ZipTools.Decompress(data);
     //MaskGZData(data); // 復元
     return(ret);
 }
示例#2
0
        public byte[] LoadResFile(int index)
        {
            if (index < 0 || this.ResCount <= index)
            {
                throw new GameError("そんなリソースありません。" + index + ", " + this.ResCount);
            }

            using (FileStream reader = new FileStream(this.ClusterFile, FileMode.Open, FileAccess.Read))
            {
                reader.Seek(this.ResStartPositions[index], SeekOrigin.Begin);
                return(ZipTools.Decompress(FileTools.Read(reader, this.ResSizes[index])));
            }
        }