예제 #1
0
        public static CompressHeader ReadHeader(FileStream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            stream.Seek(0, SeekOrigin.Begin);
            CompressHeader header = new CompressHeader();
            header.TotalSize = reader.ReadUInt32();
            //读取第一个Block的偏移位置
            header.BlockOffset = new List<uint>();
            header.BlockOffset.Add(reader.ReadUInt32());
            while (stream.Position < header.BlockOffset[0])
            {
                header.BlockOffset.Add(reader.ReadUInt32());
            }
            return header;
        }
예제 #2
0
        public static CompressHeader ReadHeader(FileStream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            stream.Seek(0, SeekOrigin.Begin);
            CompressHeader header = new CompressHeader();

            header.TotalSize = reader.ReadUInt32();
            //读取第一个Block的偏移位置
            header.BlockOffset = new List <uint>();
            header.BlockOffset.Add(reader.ReadUInt32());
            while (stream.Position < header.BlockOffset[0])
            {
                header.BlockOffset.Add(reader.ReadUInt32());
            }
            return(header);
        }