private void read(TmphFileBlockStream.TmphIndex index, ref TmphTcpBase.TmphSubByteArrayEvent TmphBuffer,
     Func<TmphAsynchronousMethod.TmphReturnValue<TmphTcpBase.TmphSubByteArrayEvent>, bool> onReturn)
 {
     var fileStream = this.fileStream;
     if (fileStream == null) onReturn(default(TmphTcpBase.TmphSubByteArrayEvent));
     else fileStream.Read(index, onReturn);
 }
 /// <summary>
 ///     开始读取文件
 /// </summary>
 public unsafe void Read()
 {
     do
     {
         var readSize = index.Size + sizeof(int);
         try
         {
             if (FileStream.isDisposed == 0)
             {
                 TmphBuffer = (memoryPool = TmphMemoryPool.GetPool(readSize)).Get();
                 var fileReader = FileStream.fileReader;
                 var offset = fileReader.Position - index.Index;
                 if (offset >= 0 || -offset < index.Index) fileReader.Seek(offset, SeekOrigin.Current);
                 else fileReader.Seek(index.Index, SeekOrigin.Begin);
                 if (fileReader.Read(TmphBuffer, 0, readSize) == readSize)
                 {
                     fixed (byte* bufferFixed = TmphBuffer)
                     {
                         if (*(int*)bufferFixed == index.Size) readSize = index.Size;
                         else
                             TmphLog.Default.Add(
                                 FileStream.FileName + " index[" + index.Index.toString() + "] size[" +
                                 (*(int*)bufferFixed).toString() + "]<>" + index.Size.toString(), false,
                                 false);
                     }
                 }
                 else readSize = 0;
             }
         }
         catch (Exception error)
         {
             TmphLog.Default.Add(error, null, false);
         }
         var onReaded = this.onReaded;
         if (readSize == index.Size)
         {
             if (
                 onReaded(new TmphTcpBase.TmphSubByteArrayEvent
                 {
                     TmphBuffer = TmphSubArray<byte>.Unsafe(TmphBuffer, sizeof(int), index.Size),
                     Event = memoryPool.PushSubArray
                 }))
                 TmphBuffer = null;
             else memoryPool.Push(ref TmphBuffer);
         }
         else
         {
             onReaded(default(TmphTcpBase.TmphSubByteArrayEvent));
             if (memoryPool != null) memoryPool.Push(ref TmphBuffer);
         }
         var next = FileStream.next(this);
         if (next == null)
         {
             FileStream = null;
             onReaded = null;
             memoryPool = null;
             TmphTypePool<TmphReader>.Push(this);
             return;
         }
         onReaded = next.onReaded;
         index = next.index;
         next.onReaded = null;
         TmphTypePool<TmphReader>.Push(next);
     } while (true);
 }
 /// <summary>
 ///     文件分块服务
 /// </summary>
 /// <param name="fileName">文件全名</param>
 public TmphFileBlockServer(string fileName)
 {
     fileStream = new TmphFileBlockStream(fileName);
 }