public static void WriteBytes(this Stream stream, MultiArray <byte> value, bool flush = true) { value.CopyTo(stream); if (flush) { stream.Flush(); } }
public static void WriteToFile(this MultiArray <byte> value, string path) { using (var fs = File.OpenWrite(path)) value.CopyTo(fs); }