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; }
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); }