/// <summary>
        /// Initialise a TarArchive for output.
        /// </summary>
        /// <param name="stream">The <see cref="TarOutputStream"/> to use for output.</param>
        protected TarArchive(TarOutputStream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

            tarOut = stream;
        }
        /// <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);
        }
        /// <summary>
        /// Initialise a TarArchive for output.
        /// </summary>
        /// <param name="stream">The <see cref="TarOutputStream"/> to use for output.</param> 
        protected TarArchive(TarOutputStream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

            tarOut = stream;
        }