void FlushCurrentCopyCommand()
        {
            if (bufferedCopy.Length <= 0)
            {
                return;
            }

            decorated.WriteCopyCommand(bufferedCopy);
            bufferedCopy = new DataRange();
        }
 public void WriteCopyCommand(DataRange chunk)
 {
     if (bufferedCopy.Length > 0 && bufferedCopy.StartOffset + bufferedCopy.Length == chunk.StartOffset)
     {
         bufferedCopy.Length += chunk.Length;
     }
     else
     {
         FlushCurrentCopyCommand();
         bufferedCopy = chunk;
     }
 }
示例#3
0
 public void WriteCopyCommand(DataRange segment)
 {
     writer.Write(BinaryFormat.CopyCommand);
     writer.Write(segment.StartOffset);
     writer.Write(segment.Length);
 }