/// <summary> /// Writes blocks of bytes to the current sink using data read from a list. /// </summary> /// <param name="sink"></param> /// <param name="source"></param> /// <param name="offset"></param> /// <param name="count"></param> /// <param name="bufferSize"> /// The size of the temporary buffer used to copy elements from the provided source. /// </param> public static void Write(this BinaryWriter sink, IList <byte> source, int offset, int count, int bufferSize = 0) { TriflesByteWriterImpl.Write(sink.ToTriflesByteWriter(), source, offset, count, bufferSize); }
/// <summary> /// Writes blocks of bytes to the current sink using data read from a sequence. /// </summary> /// <param name="sink"></param> /// <param name="source"></param> /// <param name="bufferSize"> /// The size of the temporary buffer used to copy elements from the provided source. /// </param> public static void Write(this BinaryWriter sink, IEnumerable <byte> source, int bufferSize = 0) { TriflesByteWriterImpl.Write(sink.ToTriflesByteWriter(), source, bufferSize); }
/// <summary> /// Writes blocks of bytes to the current sink using data read from a list. /// </summary> /// <param name="sink"></param> /// <param name="source"></param> /// <param name="bufferSize"> /// The size of the temporary buffer used to copy elements from the provided source. /// </param> public static void Write(this Stream sink, IList <byte> source, int bufferSize = 0) { TriflesByteWriterImpl.Write(sink.ToTriflesByteWriter(), source, bufferSize); }