コード例 #1
0
        private void SavePackageInfo(MemoryStream fileStream)
        {
            var indexPositionData = EncodeDecoder.EncodeUInt32(m_packageInfo.IndexOffset);

            fileStream.Write(indexPositionData, 0, indexPositionData.Length);
            fileStream.Flush();
        }
コード例 #2
0
        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());
        }
コード例 #3
0
 private void SavePackageInfo(FileStream fileStream)
 {
     byte[] buffer = EncodeDecoder.EncodeUInt32(this.m_packageInfo.IndexOffset);
     fileStream.Write(buffer, 0, buffer.Length);
     fileStream.Flush();
 }