private void SavePackageInfo(MemoryStream fileStream) { var indexPositionData = EncodeDecoder.EncodeUInt32(m_packageInfo.IndexOffset); fileStream.Write(indexPositionData, 0, indexPositionData.Length); fileStream.Flush(); }
public static byte[] Encode(IndexInfo info) { var result = new List <byte>(); result.AddRange(EncodeDecoder.EncodeString(info.Id)); result.AddRange(EncodeDecoder.EncodeString(info.FileName)); result.AddRange(EncodeDecoder.EncodeString(info.Path)); result.AddRange(EncodeDecoder.EncodeUInt32(info.Offset)); result.AddRange(EncodeDecoder.EncodeUInt32(info.Length)); result.AddRange(EncodeDecoder.EncodeUInt32(info.PageLength)); result.AddRange(EncodeDecoder.EncodeBoolean(info.Deleted)); return(result.ToArray()); }
private void SavePackageInfo(FileStream fileStream) { byte[] buffer = EncodeDecoder.EncodeUInt32(this.m_packageInfo.IndexOffset); fileStream.Write(buffer, 0, buffer.Length); fileStream.Flush(); }