Ejemplo n.º 1
0
        /// <summary>
        /// Create a TarArchive for writing to
        /// </summary>
        /// <param name="outputStream">The stream to write to</param>
        /// <param name="blockFactor">The blocking factor to use for buffering.</param>
        public static TarArchive CreateOutputTarArchive(Stream outputStream, int blockFactor)
        {
            var archive = new TarArchive();

            archive.tarOut = new TarOutputStream(outputStream, blockFactor);
            archive.Initialize(blockFactor * TarBuffer.BlockSize);
            return(archive);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create TarArchive for reading setting block factor
        /// </summary>
        /// <param name="inputStream">Stream for tar archive contents</param>
        /// <param name="blockFactor">The blocking factor to apply</param>
        /// <returns>
        /// TarArchive
        /// </returns>
        public static TarArchive CreateInputTarArchive(Stream inputStream, int blockFactor)
        {
            TarArchive archive = new TarArchive();

            archive.tarIn = new TarInputStream(inputStream, blockFactor);
            archive.Initialize(blockFactor * TarBuffer.BlockSize);
            return(archive);
        }
Ejemplo n.º 3
0
        public static TarArchive CreateOutputTarArchive(Stream outputStream, int blockFactor)
        {
            TarArchive archive = new TarArchive {
                tarOut = new TarOutputStream(outputStream, blockFactor)
            };

            archive.Initialize(blockFactor * 0x200);
            return(archive);
        }
Ejemplo n.º 4
0
		public static TarArchive CreateOutputTarArchive(Stream outputStream, int blockFactor)
		{
			TarArchive archive = new TarArchive();
			archive.tarOut = new TarOutputStream(outputStream, blockFactor);
			archive.Initialize(blockFactor * TarBuffer.BlockSize);
			return archive;
		}