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; } }
public void WriteCopyCommand(DataRange segment) { writer.Write(BinaryFormat.CopyCommand); writer.Write(segment.StartOffset); writer.Write(segment.Length); }