/// <summary> /// Create a TarArchive for writing to, using the default blocking factor /// </summary> /// <param name="outputStream">The <see cref="Stream"/> to write to</param> /// <returns>Returns a <see cref="TarArchive"/> suitable for writing.</returns> public static TarArchive CreateOutputTarArchive(Stream outputStream) { if ( outputStream == null ) { throw new ArgumentNullException("outputStream"); } TarOutputStream tarStream = outputStream as TarOutputStream; TarArchive result; if ( tarStream != null ) { result = new TarArchive(tarStream); } else { result = CreateOutputTarArchive(outputStream, TarBuffer.DefaultBlockFactor); } return result; }