public TarOutputStream(Stream outputStream, int blockFactor) { if (outputStream == null) { throw new ArgumentNullException("outputStream"); } this.outputStream = outputStream; buffer = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor); assemblyBuffer = new byte[0x200]; blockBuffer = new byte[0x200]; }
public static TarBuffer CreateInputTarBuffer(Stream inputStream, int blockFactor) { if (inputStream == null) { throw new ArgumentNullException("inputStream"); } if (blockFactor <= 0) { throw new ArgumentOutOfRangeException("blockFactor", "Factor cannot be negative"); } TarBuffer buffer = new TarBuffer { inputStream = inputStream, outputStream = null }; buffer.Initialize(blockFactor); return buffer; }
public TarInputStream(Stream inputStream, int blockFactor) { this.inputStream = inputStream; tarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor); }