/// <summary>
 /// Creates a new <see cref="ITriflesByteWriter"/> backed by this sink.
 /// </summary>
 /// <param name="sink">A sink to convert.</param>
 /// <returns>
 /// A new <see cref="ITriflesByteWriter"/> whose <see cref="ITriflesByteWriter.Write(byte[],
 /// int, int)"/> method is implemented directly by the sink's <see
 /// cref="BinaryWriter.Write(byte[], int, int)"/> method.
 /// </returns>
 /// <exception cref="ArgumentNullException"><paramref name="sink"/> is <c>null</c>.</exception>
 public static ITriflesByteWriter ToTriflesByteWriter(this BinaryWriter sink)
 {
     return(TriflesByteWriterImpl.ToTriflesByteWriter(sink));
 }
 /// <summary>
 /// Creates a new <see cref="ITriflesByteWriter"/> backed by this sink.
 /// </summary>
 /// <param name="sink">A sink to convert.</param>
 /// <returns>
 /// A new <see cref="ITriflesByteWriter"/> whose <see cref="ITriflesByteWriter.Write(byte[],
 /// int, int)"/> method is implemented directly by the sink's <see cref="Stream.Write(byte[],
 /// int, int)"/> method.
 /// </returns>
 /// <exception cref="ArgumentNullException"><paramref name="sink"/> is <c>null</c>.</exception>
 /// <exception cref="ArgumentException"><paramref name="sink"/> does not support writing.</exception>
 public static ITriflesByteWriter ToTriflesByteWriter(this Stream sink)
 {
     return(TriflesByteWriterImpl.ToTriflesByteWriter(sink));
 }